0 / 15 lessons — 0%
Lesson 08 / 15

Ingress — exposing apps to the world

A LoadBalancer Service gets you one public IP per service — fine for one app, expensive and messy for ten. Ingress puts a single smart entry point in front of the whole cluster and routes traffic to the right Service based on the hostname or URL path requested.

internet Ingress /api → api-svc web-svc api-svc pods pods
One public entry point, routed by host/path to different Services behind it.
# ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: main spec: rules: - host: myapp.example.com http: paths: - path: /api pathType: Prefix backend: service: name: api-svc port: { number: 80 } - path: / pathType: Prefix backend: service: name: web-svc port: { number: 80 }
An Ingress object does nothing by itself. It's just a set of routing rules — you need an Ingress controller (NGINX Ingress, Traefik, cloud-provider controllers) actually running in the cluster to read those rules and act on them. No controller installed means Ingress objects just sit there.
Try it yourselfRun kubectl get ingressclass. If it comes back empty, that's your sign no Ingress controller is installed yet — the Ingress objects above wouldn't route any traffic in that cluster.