THN Interview Prep

Kubernetes — deployments, health & traffic

Core details

Pod = smallest schedulable unit (often one main container). Deployment = desired replica count + rolling update strategy.

Service = stable ClusterIP / DNS name load-balancing to ready pods.

Ingress (or Gateway API) = HTTP routing, TLS termination at edge.

Probes

ProbePurpose
Livenessrestart if stuck (deadlock)—avoid too aggressive
Readinessremove from Service endpoints while starting / draining
Startup (optional)slow JVM/Node warm—don’t kill during boot

Resource requests/limits: CPU/memory — omit limits carelessly → noisy neighbor; wrong requests → scheduling surprises.

Understanding

Rolling update: max unavailable / max surge trade availability vs speed. readiness must fail before SIGTERM on scale-down so in-flight drains.

Senior understanding

Link HPA (metrics: CPU, custom, external queue depth). NetworkPolicy for segmentation. Secrets via CSI / external vault—not plaintext in YAML in git.

Diagram

Ingress ──► Service ──► Pod (readiness=true) ↔ Deployment (replicas)

                         liveness / startup

See also

Last updated on

Spotted something unclear or wrong on this page?

On this page