K8s by Example: Ingress
| Ingress routes external HTTP/HTTPS traffic to Services. It requires an Ingress Controller (nginx-ingress, ALB, Traefik, etc.). One Ingress can route to many Services based on host and path. |
| ingress.yaml | |
| Ingress uses the | |
| ingress-paths.yaml | |
| Path types: | |
| ingress-multihost.yaml | |
| Multiple hosts route traffic to different Services. Useful for microservices with separate domains or multi-tenant applications. Wildcard hosts ( | |
| ingress-tls.yaml | |
| TLS terminates at the Ingress. Create a | |
| ingress-default-backend.yaml | |
| Default backend handles unmatched requests. Without it, unmatched requests return 404 from the controller. Useful for custom error pages or catch-all routing. | |
| ingress-annotations.yaml | |
| Annotations configure controller-specific behavior: rate limiting, rewrites, timeouts, authentication. Each controller has different options, so check your controller’s documentation. | |
| ingress-canary.yaml | |
| Canary deployments route a percentage of traffic to a new version. nginx-ingress supports weight-based and header-based routing. This example routes 10% of traffic to the canary service. | |
| terminal | |
| Debug Ingress issues: check controller logs, verify Service endpoints, test DNS resolution, confirm TLS secrets exist. The controller creates the actual load balancer/proxy. | |