apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo-me
  namespace: default    # namespace must be the same as the backend service!
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
    cert-manager.io/cluster-issuer: letsencrypt
    acme.cert-manager.io/http01-edit-in-place: "true"
spec:
  rules:
  - host: test.imicros.de # CHANGE ME!
    http:
      paths:
      - path: /me
        pathType: Prefix
        backend:
          service:
            name: whoami
            port:
              number: 80
  tls: # < placing a host in the TLS config will determine what ends up in the cert's subjectAltNames
  - hosts:
    - test.imicros.de
    secretName: imicros-cert # < cert-manager will store the created certificate in this secret.              
