#
# Expose the demo API over port 443 if required
# The below host name is then configured on the host PC in the /etc/hosts file
#

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demoapi-ingress
  annotations:
    nginx.ingress.kubernetes.io/ingress.class: 'nginx'
    nginx.ingress.kubernetes.io/secure-backends: 'true'
    nginx.ingress.kubernetes.io/backend-protocol: 'HTTPS'
spec:
  tls:
    - hosts:
        - api.mycluster.com
      secretName: mycluster-com-tls
  rules:
    - host: api.mycluster.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: demoapi-svc
                port:
                  number: 8101