# apiVersion: networking.k8s.io/v1beta1 # for k3s < v1.19
# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
#   name: nginx-ingress
#   annotations:
#     ingress.kubernetes.io/ssl-redirect: "false"
# spec:
#   rules:
#     - http:
#         paths:
#           - path: /
#             pathType: Prefix
#             backend:
#               service:
#                 name: simple-nginx-service
#                 port:
#                   number: 80

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/backend-protocol: HTTP
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  name: hello-nginx
spec:
  rules:
    - host: hello-nginx
      http:
        paths:
          - backend:
              service:
                name: simple-nginx-service
                port:
                  name: http
            path: /
            pathType: ImplementationSpecific
  tls:
    - hosts:
        - hello-nginx
      secretName: hello-nginx-tls-secret
