---
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
  name: kubernetes-api
  namespace: default 
  labels:
    app: kubernetes
  annotations:
    kubernetes.io/ingress.class: nginx
    cert-manager.io/cluster-issuer: "selfsigned-issuer"
    nginx.ingress.kubernetes.io/backend-protocol:  "HTTPS"
spec:
  tls:
    - secretName: kubernetes-api-cert
      hosts:    
        - api-kubernetes.{{nginx_ingress.master_public_ip }}.myip.cloud.infn.it

  rules:
  - host: api-kubernetes.{{nginx_ingress.master_public_ip }}.myip.cloud.infn.it
    http:
      paths:
      - path: "/"
        pathType: Prefix
        backend:
          service:
            name: kubernetes
            port:
              number: 6443