# Ingress: HTTP routing from outside the cluster. Requires an Ingress controller.
# For new clusters, prefer the Gateway API (see 05-gateway-httproute.yaml).
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: web
  namespace: demo
spec:
  ingressClassName: example     # the class name your controller registers
  tls:
    - hosts: ["app.example.com"]
      secretName: web-tls       # e.g. created by cert-manager
  rules:
    - host: app.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  name: http
