Kubernetes Simulator
intermediate · ~10 min
One front door
The shop works inside the cluster. Now customers need to reach it at http://shop.local — one address, with /api/catalog going to catalog, /api/cart to cart and everything else to the frontend.
An Ingress is that routing table: host and path to Service and port. It does nothing alone — an ingress controller reads it and does the routing. This cluster runs ingress-nginx (kubectl get pods -n ingress-nginx), reached on port 80 of your machine; shop.local already points there in /etc/hosts.
Objectives
- Route shop.local to frontend, /api/catalog to catalog and /api/cart to cart
- Load the catalog through the front door with curl
- Bonus: See the routes and backends with kubectl describe ingress
Best on a computer with a keyboard. It works on a phone, with shortcuts under the terminal.