Q1
In Kubernetes, why can a Pod pass its Liveness Probe and keep crashing only to starve traffic—yet why is putting a Database check inside a Liveness Probe dangerous?
If a Liveness Probe checks DB connectivity and the DB hiccups for 5 seconds, Kubernetes restarts EVERY app Pod simultaneously (cascading outage)! Use Readiness Probes to pull pods cleanly out of Service endpoints during downstream DB dips, keeping Liveness Probes strictly local to process deadlocks.
Q2
What happens if a Kubernetes Container sets CPU limits: 500m when running multi-threaded JVM/Go/Node workloads (CFS Throttling)?
Linux Completely Fair Scheduler throttles container CPU slices hard per 100ms quota period even when the host node sits 80% idle—causing severe P99 latency spikes! Many teams set CPU requests accurately while omitting CPU limits (keep memory limits == requests to avoid OOMKill).
Q3
Why does a Kubernetes Pod fail with OOMKilled (Exit Code 137) vs CrashLoopBackOff?
OOMKilled (137) means Linux cgroups killed the container for exceeding its resources.limits.memory. CrashLoopBackOff means the process keeps exiting repeatedly (due to missing env vars, bad DB URL, or OOMKills) and kubelet applies exponential backoff (10s, 20s, 40s...).
Q4
Why do Deployment rolling updates still drop ~1% of active HTTP requests during zero-downtime deploys unless preStop lifecycle hooks exist?
Pod termination deletes kube-proxy/EndpointSlice iptables rules asynchronously in parallel with sending SIGTERM! Without a brief preStop: sleep 5 hook + graceful server shutdown, new packets still arrive at a container that already closed its listening socket.
Q5
What is the key difference between a Deployment + Service, vs a StatefulSet + Headless Service (`clusterIP: None`)?
Deployment creates interchangeable random-ID pods sharing one virtual Service VIP. StatefulSet guarantees stable ordered DNS identities (db-0, db-1), deterministic rolling startup order, and dedicated persistent VolumeClaimTemplates per replica.
Q6
How does PodDisruptionBudget (PDB, e.g., minAvailable: 2) protect apps during kubectl drain / cluster upgrades without blocking pod crashes?
PDB stops *voluntary* evictions (node upgrades, Cluster Autoscaler scale-down) if active healthy pods would drop below threshold—crucial for Redis/Kafka quorum! (Note: setting minAvailable: 100% or maxUnavailable: 0 blocks node upgrades permanently!)
Q7
Why does Horizontal Pod Autoscaler (HPA) fail completely to scale pods if containers omit resources.requests.cpu?
HPA calculates target utilization as a percentage of requests (currentUsage / requestedCPU). Without requests defined on every container in the Pod, HPA metrics return <unknown> and never scale.
Q8
What is the difference between a Kubernetes Taint/Toleration vs Node Affinity?
Taints *repel* ordinary pods away from specialized nodes (like GPUs) unless tolerated—but a pod with a Toleration CAN still schedule onto normal nodes! Combine Taint + Toleration WITH Node Affinity (requiredDuringScheduling) to bind pods strictly onto target nodes.
Q9
Why does mounting a single Secret or ConfigMap using subPath break automatic updates when the ConfigMap changes?
Kubernetes updates directory-mounted ConfigMaps via atomic symlink swaps. Mounting with subPath: config.yaml maps the direct file inode, skipping symlink updates until the Pod restarts.
Q10
How do Kubernetes NetworkPolicies behave if NO NetworkPolicy exists in a namespace vs creating just ONE Ingress rule?
By default K8s allows 100% open pod-to-pod traffic across namespaces. The moment ANY NetworkPolicy selects a Pod, all traffic *not explicitly allowed* by that policy becomes denied (default-deny isolation).