apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: hello-kubernetes-ingress
  annotations:
    cert-manager.io/cluster-issuer: "localhost-tls-issuer"
spec:
  ingressClassName: "nginx"
  tls:
    - hosts:
        - hw1.localhost
        - hw2.localhost
      secretName: hello-world-tls
  rules:
    - host: "hw1.localhost"
      http:
        paths:
          - pathType: Prefix
            path: "/"
            backend:
              service:
                name: hello-kubernetes-first
                port:
                  number: 80
    - host: "hw2.localhost"
      http:
        paths:
          - pathType: Prefix
            path: "/"
            backend:
              service:
                name: hello-kubernetes-second
                port:
                  number: 80
