Interview's MateKubernetes
Interview's Mate

Kubernetes

K8s · Workloads · GitOps · Cloud

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Kubernetes topics
Lesson 50/ 160
03. Kubernetes Networking & Traffic Management

Ingress Controllers (NGINX Ingress, Traefik, HAProxy)

Choose and operate Ingress controllers that terminate HTTP(S) at the cluster edge.

IntermediateIngress Controller · NGINX · Traefik3 quiz questions
Practice DevOps Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

The Ingress object is a theater seating chart, while the controller is the usher and door system that enforces it. The simple Kubernetes rule is: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

Think of it like…

The Ingress object is a theater seating chart, while the controller is the usher and door system that enforces it.

Where you’ve seen it

During a connectivity incident, the network owner runs kubectl get ingressclass; kubectl get ingress,pods,svc -A. Expected evidence: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener. If the run instead shows this symptom, stop and restore the last known state: No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate.

Words you’ll hear

Ingress Controller
For this lesson, Ingress Controller is the controlling idea: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.
NGINX
NGINX is the checkpoint; run kubectl get ingressclass; kubectl get ingress,pods,svc -A and inspect the owner chain. No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate.
Traefik
Traefik is the outcome to preserve; the cost is explicit: Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks.
Verification evidence
The evidence command is kubectl get ingressclass; kubectl get ingress,pods,svc -A. It connects the declaration to this behavior: Choose and operate Ingress controllers that terminate HTTP(S) at the cluster edge.

Visual diagram

Loading interactive diagram

Theory & deep dive

How Ingress Controller reaches the intended state

Choose and operate Ingress controllers that terminate HTTP(S) at the cluster edge. An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

The concrete checkpoint is kubectl get ingressclass; kubectl get ingress,pods,svc -A; compare the Ingress Controller owner, NGINX state, and Traefik outcome instead of treating YAML acceptance as proof.

Verify NGINX, not only object creation

Run kubectl get ingressclass; kubectl get ingress,pods,svc -A after the change and correlate the result with Events and the owning object. An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

Key takeaway: Ingress Controller is implemented only when this invariant remains observable: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

NGINX: failure boundary and production cost

No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate. The prerequisite contract is concrete: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks. A safe design limits blast radius, records the last good configuration, and uses kubectl get ingressclass; kubectl get ingress,pods,svc -A as a deterministic rollback checkpoint.

Recover from NGINX drift

Capture the current state with kubectl get ingressclass; kubectl get ingress,pods,svc -A, then correct the controlling manifest rather than patching a child object; the relevant divergence signal is specific: No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate.

Key takeaway: Accept the trade-off consciously: Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks.

How it works, step by step

Step 1 of 4
Traffic author

1. Define the reachability contract

Declare selectors, listeners, routes, or policy and keep endpoint readiness explicit: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

Ingress Controller contract → owned state
Key numbers at this step
Goal
Choose and operate Ingress controllers that terminate HTTP(S) at the cluster edge.
Owner
Ingress Controller

When to use it & trade-offs

What it is

Choose and operate Ingress controllers that terminate HTTP(S) at the cluster edge. An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

Why it matters: No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate. The invariant at risk is specific: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener. The quickest fact check before changing the design is kubectl get ingressclass; kubectl get ingress,pods,svc -A.

When to reach for it

  • Use Ingress Controller to enforce this invariant: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.
  • Use NGINX evidence from kubectl get ingressclass; kubectl get ingress,pods,svc -A in reviews and incident timelines. Choose and operate Ingress controllers that terminate HTTP(S) at the cluster edge.
  • Choose the managed ingress or mesh route only when this cost is justified by governance or scale: Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks.

When to avoid or be careful

  • Avoid assuming Ingress Controller is complete after YAML submission; the required behavior is concrete: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.
  • Avoid treating the next symptom as random; check the owner and state with kubectl get ingressclass; kubectl get ingress,pods,svc -A first: No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate.
  • Avoid adopting a heavier platform wrapper before measuring its cost: Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks.

Native, manual, and managed paths for Ingress Controller

Built-in API path
Best for: Choose and operate Ingress controllers that terminate HTTP(S) at the cluster edge. A concrete incident check is kubectl get ingressclass; kubectl get ingress,pods,svc -A.

Strengths: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

Watch out: Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks. Recovery must also recognize this signal: No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate.

Datapath-specific extension
Best for: Quickly testing the NGINX assumption with kubectl get ingressclass; kubectl get ingress,pods,svc -A; the expected invariant is: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

Strengths: kubectl get ingressclass; kubectl get ingress,pods,svc -A gives immediate feedback without first building a platform layer.

Watch out: A manual change can hide drift, and unlike Ingress Controller, it does not make this symptom self-documenting: No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate.

Managed ingress or mesh
Best for: Teams that need Traefik integrated with guardrails; the evidence path is kubectl get ingressclass; kubectl get ingress,pods,svc -A.

Strengths: Platform controls can wrap this exact behavior in policy or dashboards: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.

Watch out: The added platform ownership buys value at this cost: Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks.

Interview signals & numbers to know

When this topic comes up

  • Interview anchor: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.
  • Trace Ingress Controller to Traefik through NGINX; the invariant is: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.
  • Recognize the symptom: No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate.
  • Justify the cost: Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks.
  • Verify with kubectl get ingressclass; kubectl get ingress,pods,svc -A instead of only inspecting YAML.

Benchmarks & rules of thumb

1 -
active implementation should own a given ingressClass
443 -
conventional public HTTPS listener
2 -
places to check: Ingress status and controller logs

Common mistakes & follow-ups

Common interview mistakes

  • Debugging only the child object misses the Ingress Controller owner contract: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener.
  • Ignoring this telltale condition leads to unrelated changes: No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate.
  • Repeating kubectl get ingressclass; kubectl get ingress,pods,svc -A without an owner for remediation wastes retry cost. Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks.

Likely interviewer follow-ups

  • How would API output and runtime evidence prove this behavior: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener?
  • Which owner object, logs, and Events would you inspect for this symptom-No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate-?
  • At what threshold would this cost become unacceptable: Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks?
Interview tip: Interview sequence: state the invariant, run kubectl get ingressclass; kubectl get ingress,pods,svc -A, name the failure, then justify the cost. Invariant: An Ingress resource stores HTTP routing intent, but an Ingress controller such as NGINX, Traefik, or HAProxy watches it and programs the actual data plane and TLS listener. Failure: No controller for ingressClassName, a mismatched Service port, or conflicting annotations can leave an accepted Ingress with no working route or certificate. Cost: Ingress decouples policy from implementation but controller-specific annotations, upgrades, and failure domains make behavior less portable than the API looks.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Ingress Controllers (NGINX Ingress, Traefik, HAProxy) with generative AI interview Q&A and hands-on practice.

Open DevOps Q&A →Tech Learn Q&A
Previous topic
EndpointSlices & High-Scale Service Routing
Next topic
Ingress Rules: Path-Based & Host-Based Routing