# apiVersion: networking.k8s.io/v1beta1 # for k3s < v1.19
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: k8gb-discovery-https
  annotations:
    kubernetes.io/ingress.class: traefik
    cert-manager.io/cluster-issuer: test-selfsigned
spec:
  rules:
    - http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: k8gb-discovery
                port:
                  number: 8080
  tls: # < placing a host in the TLS config will indicate a certificate should be created
    - hosts:
        - disco.example.com
    - secretName: selfsigned-cert-tls # < cert-manager will store the created certificate in this secret.
