Senior Kubernetes engineering and Site Reliability Engineering (SRE) interviews have abandoned generic trivia questions like “What is the difference between a Deployment and a StatefulSet?”. Modern technical interview loops focus intensely on live operational post-mortems and cluster triage. Interviewers present broken clusters, failing pod states, and network packet dumps, asking: “A pod is stuck in CrashLoopBackOff with Exit Code 137, while DNS queries to other services are intermittently failing across two worker nodes. Walk me through your command-line triage process.”. In this master interview guide, we break down the Top 30 scenario-based Kubernetes troubleshooting and Container Network Interface (CNI) interview questions, detailing the Linux kernel mechanics, kubectl triage commands, and architectural remediations required to ace L2/L3 infrastructure interviews.
Kubernetes War Room Triage & Knowledge Domain Matrix
| Knowledge Domain | Core Failure Scenarios Evaluated | Weightage in L2/L3 SRE Interviews |
|---|---|---|
| 1. Pod Lifecycle & Container States | CrashLoopBackOff, OOMKilled (Exit 137), ImagePullBackOff, InitContainer hangs | 35% (Immediate triage baseline) |
| 2. Cluster Networking & CNI Failures | Calico/Cilium IP exhaustion, MTU mismatch, iptables rule explosion, kube-proxy sync | 30% (Critical cluster stability) |
| 3. Service Discovery & CoreDNS | DNS 5-second lookup delay (conntrack race), CoreDNS throttling, search domain bloat | 20% (High-concurrency microservice issues) |
| 4. Storage & Node Pressure | DiskPressure, MemoryPressure, Multi-Attach error volume lockouts, eviction thresholds | 15% (Host-level degradation) |
Scenario 1: Diagnosing OOMKilled (Exit Code 137) vs. Graceful Exit
The Interview Scenario: A critical Java microservice pod terminates repeatedly in production. kubectl get pods shows STATUS: CrashLoopBackOff with RESTARTS: 14. How do you definitively prove whether the application crashed due to an internal unhandled Java exception or was murdered by the Linux Kernel Out-Of-Memory (OOM) killer?
The Architectural Solution:
- Command-Line Inspection: Run
kubectl describe pod <pod-name>and inspect theLast Statecontainer block. Look forExit Code: 137andReason: OOMKilled. Exit Code 137 corresponds to128 + 9 (SIGKILL), indicating the Linux kernel sent a non-catchable kill signal. - Host-Level Verification: On the worker node hosting the pod, run
dmesg -T | grep -E -i 'oom[-_]killer|killed process'. The kernel log will print the exact memory consumption, the cgroup path, and the victim process PID. - Java JVM Trap: If running Java without JVM container awareness (
-XX:+UseContainerSupport), the JVM calculates its heap allocation based on the host node’s physical RAM (e.g., 64GB) rather than the pod’s container limit (e.g., 4GB), immediately triggering an OOMKill upon memory spike.
# Command line triage workflow for Exit Code 137
kubectl get pod order-service-78f99d6-x8k2l -o jsonpath='{.status.containerStatuses[0].lastState.terminated}'
# Expected diagnostic output:
# {"exitCode":137,"finishedAt":"2026-11-05T08:30:12Z","reason":"OOMKilled","startedAt":"2026-11-05T08:15:00Z"}
Scenario 2: The 5-Second DNS Delay (Linux Kernel Conntrack Race Condition)
The Interview Scenario: High-traffic microservices experience random 5-second request timeouts when resolving other internal cluster services (e.g., database.prod.svc.cluster.local). The failure happens only on high-concurrency clusters. What is causing this, and what is the fix?
The Architectural Solution:
- Underlying Mechanism: The Linux
glibcresolver sends A and AAAA DNS queries concurrently over UDP from the same socket. Under high concurrency, both UDP packets traverse the Linux kernel Netfilter connection tracking table (conntrack) simultaneously. Due to an internal kernel lock race condition in older kernels/iptables, one of the two conntrack entries drops, forcing glibc to wait for its default 5-second UDP retransmission timeout. - Engineering Fix:
- Deploy NodeLocal DNSCache: Runs a DNS caching agent on every node as a DaemonSet, terminating UDP lookups locally and communicating with upstream CoreDNS via TCP.
- Add
single-request-reopenoruse-vcto pod DNS configuration options viadnsConfigto force sequential lookups or TCP mode.
# Pod Spec Fix to bypass the conntrack 5-second race condition
spec:
dnsConfig:
options:
- name: single-request-reopen
- name: ndots
value: "2"
Scenario 3: CNI IP Address Exhaustion & Pod Sandbox Creation Failed
The Interview Scenario: When an Autoscaler triggers during a traffic surge, new pods are stuck in ContainerCreating. The event logs report: “Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container: CNI failed to allocate IP address”. How do you triage this on AWS VPC CNI or Calico?
The Architectural Solution:
- Root Cause: The node’s primary network interface or secondary IP address pool in the CNI IPAM daemon (e.g.,
aws-nodeorcalico-node) has run out of allocatable IP addresses from the assigned subnet CIDR block. - AWS VPC CNI Triage: Inspect the node’s ENI limits. An
m5.largeinstance can attach a maximum of 3 ENIs with 10 IPs per ENI (max 30 pods). If the subnet has available IPs but the node cannot attach another ENI, verifyWARM_IP_TARGETandMINIMUM_IP_TARGETsettings in theaws-nodedaemonset. - Permanent Fix: Enable Prefix Delegation (
ENABLE_PREFIX_DELEGATION=trueon AWS VPC CNI) to assign/28IPv4 blocks instead of individual secondary IPs, increasing pod capacity per node to over 110 pods.
Scenario 4: MTU Size Mismatch Causing Silent Packet Drops
The Interview Scenario: Pods can communicate with small HTTP GET requests, but large payloads (e.g., file uploads or large JSON blobs > 1500 bytes) hang indefinitely until client timeout. Pings between pods succeed with zero loss. What is the root cause?
The Architectural Solution:
- Root Cause: MTU (Maximum Transmission Unit) mismatch in the CNI overlay network (VXLAN or Geneve). Overlay encapsulation adds 50 bytes of outer packet headers. If the host physical interface has an MTU of 1500, but the CNI virtual interface inside the pod is also set to 1500, large packets exceed the physical MTU (1550 bytes). If intermediate switches drop packets with the
DF(Don’t Fragment) bit set, the packets vanish silently without an ICMP Fragmentation Needed notification. - Remediation: Configure the CNI MTU to be at least 50 bytes smaller than the underlying host MTU (e.g., set CNI MTU to
1450for standard 1500-byte physical networks, or8950for 9000-byte Jumbo Frame networks).
Comprehensive Kubernetes Diagnostic Error Matrix
| Error Identifier | Underlying Failure Mechanism | Engineering Remediation Action |
|---|---|---|
CrashLoopBackOff (Exit 1) |
Application runtime exception, missing configuration file, or invalid environment variable. | Inspect application stdout/stderr logs with kubectl logs <pod> --previous to capture logs prior to restart. |
Multi-Attach error for volume |
Underlying cloud block storage (AWS EBS / Azure Disk) remains locked to a drained/failed worker node. | Check VolumeAttachment API object: kubectl get volumeattachments. Forcibly detach stale volume via cloud CLI if node is terminated. |
NodeNotReady (Kubelet stopped posting status) |
Worker node disk space exhausted (DiskPressure) or systemd kubelet.service crashed. |
SSH to node. Check journalctl -u kubelet -e and df -h /var/lib/docker /var/lib/containerd to clear stale container images. |
CreateContainerConfigError |
Referenced Kubernetes ConfigMap or Secret key does not exist in the namespace. |
Run kubectl describe pod. Check spec.containers[*].envFrom and verify secret exists with matching key name. |
ImagePullBackOff (ErrImagePull) |
Container registry authentication failure, rate limit hit, or non-existent image tag. | Verify imagePullSecrets. If pulling from Docker Hub, check for 429 rate limit errors in event logs. |
Scenario 5: CoreDNS High CPU & Upstream Throttling
In large Kubernetes clusters running thousands of microservices, CoreDNS frequently becomes a bottleneck. When CoreDNS pods hit CPU limits, DNS latency spikes cluster-wide:
# Triage CoreDNS pod metrics and query latency via Prometheus metrics endpoint
kubectl top pods -n kube-system -l k8s-app=kube-dns
# Inspect CoreDNS live query logs to identify runaway misconfigured workloads
kubectl logs -n kube-system -l k8s-app=kube-dns -f --tail=100
# Scale CoreDNS deployment or deploy horizontal pod autoscaler
kubectl scale deployment coredns -n kube-system --replicas=6
Frequently Asked Questions (FAQ)
Q1: What is the difference between a Liveness Probe and a Readiness Probe?
A Liveness Probe determines whether the container is healthy and running; if it fails, the kubelet kills the container and restarts it according to its restart policy. A Readiness Probe determines whether the container is ready to accept user network traffic; if it fails, Kubernetes removes the pod’s IP address from all matching Service endpoints without restarting the container.
Q2: Why should you never set CPU limits on latency-sensitive microservices?
Setting CPU limits (spec.resources.limits.cpu) triggers Linux CFS (Completely Fair Scheduler) quota throttling. Even when the worker node has 70% idle CPU capacity, if a pod bursts beyond its fractional millicore CFS quota during a 100ms window, the kernel freezes the container’s execution threads, causing catastrophic p99 latency spikes.
Q3: What causes an InitContainer to remain stuck in Pending?
An InitContainer remains stuck in Pending if the pod cannot be scheduled onto any node due to insufficient CPU/memory resources, unsatisfied NodeSelectors/Affinities, or persistent volume claims (PVCs) that cannot be bound in the target availability zone.
Recommended Hardware & Reference Architecture Literature
Tested tools and authoritative documentation to implement the architectures covered in this lab: