CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

Ingress Routing Rules

The obvious path-based Ingress returns 404, and the 404 comes from your application rather than the controller. The path is matched and then forwarded unchanged, so the backend is asked for a directory it does not have.

Services and Networking Guide 58 of 103 Intermediate

Written against the versions above. rewrite-target is an ingress-nginx annotation, not part of the Ingress API. Other controllers spell it differently.

Requests go to the controller's HTTP node port with an explicit Host header.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. The obvious version, and it returns 404

  2. Ask the backend directly and the answer is the same

  3. rewrite-target, and the capture group it needs

  4. Host routing, and what a miss looks like

Official sources