Back to Practice
Lab

HTTP Routing with Ingress

Expose an internal Service to the outside world over HTTP with an Ingress rule — host, path and backend.

Your mission

A ClusterIP Service is only reachable from inside the cluster. To expose an HTTP application to the outside — on a real hostname, sharing one load balancer across many services — you use an Ingress.

An Ingress is a set of routing rules: "requests for this host and this path go to that Service on that port." An ingress controller (nginx, Traefik, Envoy Gateway…) watches these objects and programs the actual proxy. Your job as an app developer is to write the rule correctly; the platform runs the controller.

The rule has four parts that must all line up: the host, the path (and its pathType), and the backend service name and port. Get the backend wrong and the Ingress is valid but routes traffic to nothing.

In this lab a shop Deployment and Service are already running internally. You write the Ingress that publishes it at shop.example.com.

Useful aliases

k is aliased to kubectl and completion is configured. The jumpbox also has k9s, jq and yq.

Skills you'll put into practice

ingressnetworkingworkloads

Make it your own.

Use this topic as a starting point for a fresh custom scenario.

Create a variation