Skip to content
StackDecode
IntermediateLesson 14 of 35

Ingress and the Gateway API

HTTP routing from outside the cluster to your Services.

An Ingress defines host and path rules; an ingress controller (NGINX, Traefik, cloud-specific) implements them. One load balancer can serve many apps.

yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: web
spec:
  ingressClassName: nginx
  tls:
    - hosts: [app.example.com]
      secretName: app-tls
  rules:
    - host: app.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service: { name: web, port: { number: 80 } }

The Gateway API is the newer, more expressive successor (roles, multiple protocols, traffic splitting).