apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo-nginx
  namespace: default
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
    kubernetes.io/ingress.class: nginx 
    cert-manager.io/issuer: letsencrypt-kube
spec:
  rules:
  - host: app.example.com
    http:
      paths:
      - backend:
          service:
            name: demo-nginx
            port:
              number: 80
        path: /
        pathType: Prefix
  tls:
  - hosts:
    - app.example.com
    secretName: app-example-com-tls