Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
name: ingress-backend
namespace: mattermost
spec:
timeoutSec: 43200
connectionDraining:
drainingTimeoutSec: 60
---
# A nodeport is created because GCE Ingress doesn't work with ClusterIP
# (which is the service created by the mattermost operator).
apiVersion: v1
kind: Service
metadata:
name: mattermost-nodeport
namespace: mattermost
labels:
app: mattermost
annotations:
cloud.google.com/backend-config: '{"ports": {"8065":"ingress-backend", "80":"ingress-backend"}}'
spec:
type: NodePort
selector:
app: mattermost
ports:
- name: app
port: 8065
protocol: TCP
targetPort: app
- name: http
port: 80
protocol: TCP
targetPort: app
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: mattermost-ingress
namespace: mattermost
annotations:
kubernetes.io/ingress.class: gce
kubernetes.io/ingress.global-static-ip-name: mattermost-global-ip
networking.gke.io/managed-certificates: xxx-com-tls-managed
spec:
backend:
serviceName: mattermost-nodeport
servicePort: 8065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment