apiVersion: v1
kind: Service
metadata:
  name: flink-jobmanager
spec:
  type: LoadBalancer
  loadBalancerIP: 10.42.42.236
  ports:
  - name: rpc
    port: 6123
  - name: blob-server
    port: 6124
  - name: webui
    port: 8081
  selector:
    app: flink
    component: jobmanager
---
# Hosting
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: flink-jobmanager-auth
  annotations:
    #nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
    #nginx.ingress.kubernetes.io/proxy-ssl-verify: "off"
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
    # type of authentication
    nginx.ingress.kubernetes.io/auth-type: basic
    nginx.ingress.kubernetes.io/auth-secret: basic-auth
    nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Flink'
spec:
  tls:
  - hosts:
    - flink.monkeybox.org
    secretName: flink-tls
  rules:
  - host: flink.monkeybox.org
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: flink-jobmanager
            port:
              number: 8081
