Q: Explain Ingress Controller. What is the difference between Ingress resource, Ingress Controller, and Service?
Demystifying the Kubernetes Ingress architecture: distinguishing the Ingress Resource (manifest), Ingress Controller (reverse proxy daemon), and ClusterIP Services, tracing packet flow from client to container.
Want to master this scenario in a live sandbox? KodeKloud's CKA & CKAD Hands-On Certification Track covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: Candidates often confuse the declarative Ingress YAML with the actual reverse proxy software. Ingress requires two components: the declarative API rule and an active controller running in the cluster.
The Three Discrete Layers (Resource vs Controller vs Service)
Understanding the separation of concerns:
End-to-End Traffic Flow (Internet to Application)
How an HTTP request traverses the layers:
- 1. User accesses
https://api.example.com/checkout. - 2. DNS resolves to the Cloud Load Balancer (AWS ALB, Azure App Gateway, or NLB).
- 3. Load balancer forwards traffic to the Ingress Controller Pods running in the cluster.
- 4. The Ingress Controller evaluates its in-memory routing table: matches host
api.example.comand path/checkout. - 5. The Performance Secret: Modern ingress controllers (like NGINX) bypass the
kube-proxyClusterIP NAT hop and route directly to the backend Pod IP discovered via the Kubernetes Endpoints API.
Production Add-Ons: TLS & Security
Essential components paired with Ingress Controllers in enterprise setups:
- Cert-Manager: Automates Let's Encrypt / enterprise PKI SSL certificate issuance and renewal into Kubernetes TLS secrets.
- IngressClass: Decouples cluster from specific controllers, allowing multiple ingress controllers (e.g. internal vs public) in one cluster.
- WAF & Rate Limiting: Ingress controllers inject annotations for rate-limiting (
limit-rps), IP whitelisting, and WAF protection.
- Ingress Resource is the YAML routing specification (hosts, paths, TLS secrets).
- Ingress Controller is the active reverse proxy daemon (NGINX, Traefik, Envoy, AWS ALB Controller) executing the rules.
- Service is the backend abstraction; the Ingress Controller watches Service Endpoints to stream traffic directly to container IPs.
- Client -> Cloud LB -> Ingress Controller Pod -> Evaluates Host/Path Rules -> Direct connection to target Pod IP.
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Confusing ALB 502 Bad Gateway (target connection reset) with 504 Gateway Timeout (upstream response timeout) when configuring Ingress Controller Layer 502 indicates the backend target closed the TCP connection prematurely or returned malformed HTTP, whereas 504 means the target failed to respond before idle timeout.
- Setting target deregistration delay to zero instead of allowing connection draining when configuring Ingress Controller Layer Instant target deregistration severs in-flight HTTP requests during auto-scaling scale-in or rolling deployments, causing immediate user-facing drops.
-
Failing to query CloudWatch ELB metrics (
HTTPCode_ELB_5XXvsHTTPCode_Target_5XX) during load balancer outages when configuring Ingress Controller Layer Comparing load balancer generated errors against target generated errors immediately isolates whether the issue lies in the proxy tier or application runtime. - Overlooking Security Group rules on backend EC2/ECS instances that block health check traffic from the ALB when configuring Ingress Controller Layer Target instances must explicitly permit inbound HTTP/HTTPS traffic from the ALB security group on the configured container/application port.