Created
November 13, 2022 20:00
-
-
Save jmrobles/22f82bb4bb36677fe20fae44c2036c05 to your computer and use it in GitHub Desktop.
Mastodon K8S ingress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mastodon-svc | |
namespace: mastodon | |
spec: | |
selector: | |
app: mastodon | |
type: ClusterIP | |
ports: | |
- name: mastodon-web-port | |
protocol: TCP | |
port: 3000 | |
targetPort: 3000 | |
- name: mastodon-streaming-port | |
protocol: TCP | |
port: 4000 | |
targetPort: 4000 | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: mastodon-ingress | |
namespace: mastodon | |
annotations: | |
cert-manager.io/cluster-issuer: "letsencrypt-prod" | |
spec: | |
tls: | |
- hosts: | |
- mastodon.example.com | |
secretName: mastodon-tls | |
rules: | |
- host: mastodon.example.com | |
http: | |
paths: | |
- path: /api/v1/streaming | |
pathType: Prefix | |
backend: | |
service: | |
name: mastodon-svc | |
port: | |
number: 4000 | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: mastodon-svc | |
port: | |
number: 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment