Modern engineering loops for Senior DevOps, Cloud, and SRE roles have evolved beyond memorizing definitions. Top tech teams test your understanding of Linux kernel primitives, control plane reconciliation, race conditions, and real-time failure triage. This guide compiles 105 battle-tested questions and architectural answers with direct links into our live scenario runbooks on interview.naveedkumbhar.com.
The 970+ Incident Handbook & K8s Runbooks are exclusive to subscribers — unlock for FREE
Get battle-tested production runbooks, AWS architecture blueprints, and zero-downtime CI/CD post-mortems sent directly to your inbox. 100% free, no spam.
1. Module 1: Architecture & Control Plane Internals (Q1–Q14)
How Kubernetes orchestrates distributed state: API server, etcd raft consensus, scheduler heuristics, controller loops, and container runtimes.
1. What happens under the hood when you run 'kubectl apply -f deployment.yaml'?
kubectl apply, the client validates the YAML schema, merges local changes with metadata.generation, and issues an HTTP POST or PATCH to kube-apiserver. The API server performs:
1. Authentication & Authorization: Validates user X.509 cert or OIDC bearer token, followed by RBAC checks.
2. Admission Control: Passes the object through Mutating Admission Webhooks (e.g., sidecar injectors), Schema Object validation, and Validating Admission Webhooks (e.g., Kyverno, OPA Gatekeeper).
3. etcd Persistence: The object is serialized to JSON/protobuf and committed into etcd with a new resourceVersion.
4. Controller Reconciliation: kube-controller-manager (DeploymentController) detects the new object via watch API, calculates the ReplicaSet delta, and creates the ReplicaSet. The ReplicaSetController creates the individual Pod objects in Pending state.
5. Scheduling: kube-scheduler filters and scores worker nodes, binds the Pod to a node by setting nodeName, and updates etcd.
6. Kubelet Execution: The target node's kubelet notices the scheduled Pod via its watch channel, invokes the CNI plugin for pod network namespace creation, CSI plugin for volume attachment, and the CRI (containerd) to pull container images and spawn containers.
2. How does etcd maintain distributed consistency, and what causes quorum loss?
etcd uses the Raft consensus algorithm. It requires an active quorum of (N/2) + 1 nodes to accept writes. In a 3-node cluster, 2 nodes must agree; in a 5-node cluster, 3 must agree.
Quorum Loss Causes: Split-brain network partitions, high disk fsync latency (>10ms on slow disks), out-of-memory crashes on control plane nodes, or simultaneous node termination. When quorum is lost,
kube-apiserver becomes read-only or completely unresponsive to write operations, freezing deployments and pod scheduling while existing running pods continue executing undisturbed.
👉 Deep Dive: Learn the disaster recovery runbook in Kubernetes Control Plane & Pod Scheduling Triage.
3. Explain the difference between Filtering (Predicates) and Scoring (Priorities) in kube-scheduler.
- Filtering (formerly Predicates): Eliminates nodes that cannot run the Pod. Checks include
NodeResourcesFit(CPU/memory requests),NodeName,NodePorts,PodTopologySpread, andNodeAffinity/ Taints. If no node passes, the Pod stays inPendingwithFailedSchedulingevent. - Scoring (formerly Priorities): Ranks remaining candidate nodes on a scale of 0 to 100 based on plugins like
NodeResourcesBalancedAllocation,ImageLocality(preferring nodes where container image layers are already cached), andNodeAffinityweights. The node with the highest cumulative score is selected.
4. What is the Kubelet PLEG (Pod Lifecycle Event Generator) and why does 'PLEG is not healthy' occur?
kubelet that periodically inspects the container runtime (e.g., containerd) to detect container state transitions (started, exited, died) and publish events to the kubelet's internal channels.
'PLEG is not healthy' triggers when the relist cycle takes longer than 3 minutes (default timeout). Root causes: 1. Container runtime deadlock or unresponsive runtime socket (
/run/containerd/containerd.sock).
2. Heavy disk I/O wait on the root filesystem preventing rapid container status queries.
3. Excessive pod churn or zombie processes flooding the node's process table.
Diagnostic command:
journalctl -u kubelet -e --no-pager | grep -i pleg.
5. Compare kube-proxy modes: iptables vs IPVS vs eBPF (Cilium).
- iptables mode: Uses sequential kernel packet matching rules. Rule traversal cost scales as O(N) with the number of Services and Endpoints. In clusters with >5,000 Services, updating rules creates massive CPU spikes and packet delay.
- IPVS (IP Virtual Server) mode: Uses Netfilter transport-layer switching with hash tables. Operates at O(1) complexity regardless of cluster size. Supports advanced load balancing algorithms (round-robin, least connections, locality).
- eBPF mode (e.g. Cilium / Calico eBPF): Bypasses the Netfilter stack entirely. Injects eBPF programs directly at the network interface (XDP / TC layers) and socket layers (sockops). Delivers near wire-speed routing, eliminating connection tracking overhead and conntrack table exhaustion.
6. How does kube-controller-manager achieve high availability, and what is leader election?
kube-controller-manager runs multiple replicas for redundancy, but only one active leader executes the reconciliation loops at any given moment. Leaders are coordinated using a Lease resource in the kube-system namespace.
The active leader renews its lease every 2 seconds (default
renewDeadline: 10s). If the leader crashes or loses network connectivity to the API server, standby instances detect the expired lease and acquire leadership within 15 seconds (leaseDuration), preventing dual-controller split-brain write conflicts.
7. What is the difference between CRI, OCI, and container runtimes (containerd vs runc)?
- CRI (Container Runtime Interface): A gRPC interface defined by Kubernetes that allows
kubeletto communicate with container runtimes without recompiling Kubernetes code. - OCI (Open Container Initiative): Industry standards specifying container images (image-spec) and how container bundles are executed (runtime-spec).
- High-level runtime (containerd / CRI-O): Implements the CRI gRPC API, pulls container images over HTTPS, manages snapshot filesystems, and delegates container execution to low-level runtimes.
- Low-level runtime (runc / crun): Directly interacts with the Linux kernel using cgroups, namespaces, and seccomp to spawn and isolate the actual Linux process.
8. What is the difference between declarative ('apply') and imperative ('create', 'replace') management?
kubectl create fails if the resource already exists. kubectl replace overwrites the full object, requiring you to supply the complete definition and stripping fields injected by admission controllers.
Declarative (apply): Focuses on the desired end state. Uses a three-way merge patch between the local file, the live object in etcd, and the
last-applied-configuration annotation. Retains fields dynamically added by controllers (like replicas scaled by HPA).
9. How does the API Server enforce optimistic concurrency control?
metadata.resourceVersion field stored in etcd. When a client reads an object, it receives its current resourceVersion. When submitting updates (PUT/PATCH), the client must supply this version. If another client updated the resource in the interim, etcd rejects the write with HTTP status 409 Conflict. Clients must re-fetch the latest state, re-apply modifications, and retry.
10. What is an API Aggregation layer and when would you use it instead of CRDs?
Use CRDs (Custom Resource Definitions) for 95% of use cases: declarative workflows, custom operators, and application lifecycle definitions.
Use API Aggregation when: 1. You require a dedicated high-throughput datastore (e.g.,
metrics-server storing time-series metrics in in-memory RAM without thrashing etcd).
2. Custom business validation logic requiring non-standard protocol translations.
3. Strict multi-tenant data isolation where custom objects must not reside on the primary control plane disk.
11. What is the difference between Mutation and Validation Admission Webhooks?
- Mutating Admission Webhooks: Executed first. Can modify the object request (e.g., injecting Istio sidecar proxies, setting default security contexts, adding corporate labels).
- Validating Admission Webhooks: Executed second. Read-only validation. Evaluates business rules (e.g., rejecting images with
:latesttag, verifying non-root user). Rejection terminates the request immediately with an HTTP 400 error.
12. What happens if a Validating Webhook endpoint fails or times out?
failurePolicy:
failurePolicy: Fail(Default in secure production clusters): If the webhook service is unreachable or times out (default 10s), the API request is rejected outright. If this webhook matches Pod creations, cluster-wide pod scheduling halts!failurePolicy: Ignore: The API server logs a warning and allows the request through without validation. High availability best practice: Webhooks must run at least 3 replicas spread across multiple availability zones with PodDisruptionBudgets.
13. What is garbage collection in Kubernetes, and what are cascading deletions?
- Foreground Cascading Deletion: The parent object transitions to 'deletion in progress' with a
foregroundDeletionfinalizer. The controller deletes all child objects (e.g., Pods) first; once all children are gone, the parent is deleted. - Background Cascading Deletion: The parent object is deleted immediately from etcd, and the garbage collector subsequently deletes the child objects in the background.
- Orphan Deletion: The parent is deleted, but child objects have their
ownerReferencesremoved and continue running independently.
14. How does kubelet communicate with containerd via UNIX sockets?
/run/containerd/containerd.sock. Two distinct gRPC services are consumed:
1. RuntimeService: Responsible for sandbox creation (pod network namespace setup), starting/stopping containers, attaching/executing commands, and collecting metrics.
2. ImageService: Responsible for querying local images, pulling remote container layers from registries, and removing stale images during node disk garbage collection.
2. Module 2: Pods, Containers & Workload Controllers (Q15–Q28)
Deep dive into pod phases, init containers, sidecars, and selecting between Deployments, StatefulSets, and DaemonSets.
15. Walk through the Pod phases: Pending, Running, Succeeded, Failed, Unknown.
Pending: The Pod manifest was accepted by the API server, but one or more containers are not yet created. Common causes: waiting for scheduler assignment, pulling container images, or waiting for PVC volume binding.Running: Bound to a node, all containers created, and at least one container is executing or in the process of starting.Succeeded: All containers in the Pod completed execution with exit code 0. Typical for batchJobworkloads.Failed: All containers terminated, and at least one container terminated with a non-zero exit code or was terminated by the system (e.g., OOMKilled exit code 137).Unknown: The API server cannot communicate with the node's kubelet (typically due to network partition or node failure).
16. What is the difference between Init Containers, App Containers, and Native Sidecar Containers (K8s 1.28+)?
- Init Containers: Run sequentially to completion before any app container starts. If an init container exits with non-zero, the Pod restarts according to its
restartPolicy. - App Containers: Execute concurrently throughout the Pod lifecycle until stopped or crashed.
- Native Sidecar Containers (K8s 1.28+ feature gate
SidecarContainers, GA in 1.29+): Init containers configured withrestartPolicy: Always. They start before application containers, stay running throughout the Pod lifetime, and shut down after the main application containers finish, solving historical logging and proxy termination issues.
17. When must you use a StatefulSet instead of a Deployment?
- Stable, unique network identifiers: Predictable hostnames (
pod-0,pod-1) resolvable via Headless Services (app-0.app-service.ns.svc.cluster.local). - Stable, persistent storage: Each replica receives a dedicated PVC generated by
volumeClaimTemplatesthat persists across pod rescheduling. - Ordered, graceful deployment and scaling: Sequential startup (0, 1, 2) and reverse-order termination (2, 1, 0) essential for quorum databases (ZooKeeper, Kafka, Cassandra).
18. What is a DaemonSet and how does scheduling work for DaemonSet pods?
In modern Kubernetes (1.17+), DaemonSet pods are scheduled by the default
kube-scheduler using node affinity rules rather than the DaemonSet controller directly. DaemonSet pods automatically apply default tolerations for node taints like node.kubernetes.io/not-ready and node.kubernetes.io/unschedulable to ensure continuous daemon execution.
19. What is a Pod Disruption Budget (PDB) and why is it critical during node maintenance?
kubectl drain, cluster autoscaler node consolidation, or EKS AMI rolling upgrades).
You specify either
minAvailable: 2 or maxUnavailable: 1. When an engineer drains a node, the Eviction API checks active PDBs; if evicting the pod violates the budget, the eviction is blocked until replacements are healthy elsewhere, preventing unexpected production outages.
20. What is the difference between RollingUpdate and Recreate deployment strategies?
RollingUpdate: Default strategy. Gradually replaces old pods with new ones without downtime. Governed bymaxSurge(how many pods can be created above desired replica count) andmaxUnavailable(how many pods can be unavailable during update).Recreate: Terminates all existing pods simultaneously before creating the new version. Incurs immediate downtime. Required only when multiple application versions cannot run concurrently (e.g., non-backward-compatible database schema migrations or storage locked to a single writer).
21. How do you trigger and safely rollback a Deployment in production?
# Trigger a rolling update with new image
kubectl set image deployment/payment-svc payment=company/payment:v2.4.1 --record
# Inspect rollout status in real-time
kubectl rollout status deployment/payment-svc
# View revision history
kubectl rollout history deployment/payment-svc
# Rollback immediately to previous revision
kubectl rollout undo deployment/payment-svc
# Rollback to a specific historical revision
kubectl rollout undo deployment/payment-svc --to-revision=3
👉 Live SRE Runbook: Master emergency rollback triage in Fast & Safe Rollback of Bad Production Deployments.
22. What is the difference between a Job and a CronJob, and what is 'concurrencyPolicy'?
concurrencyPolicy defines how overlapping CronJob executions are handled if a previous job is still running:
Allow(default): Multiple job instances run concurrently. Can exhaust database connection pools or memory.Forbid: Skips the new job if the previous instance has not completed.Replace: Cancels the currently running job and spawns the new job.
23. What are ephemeral containers and when should you use them?
kubectl debug. Unlike standard containers, they cannot have ports or resource reservations.
Use them to troubleshoot production pods built from distroless or minimal images that lack shells, curl, or networking tools:
kubectl debug -it pod/payment-api-7b9 --image=nicolaka/netshoot --target=payment-api
The debug container shares the target container's process, network, and IPC namespaces.
24. What are PreStop hooks and terminationGracePeriodSeconds?
Terminating phase and endpoints are removed from Service Endpoints.
2. Kubelet executes the preStop hook (if defined).
3. Kubelet sends SIGTERM to container processes.
4. Kubelet waits up to terminationGracePeriodSeconds (default 30s).
5. If processes have not exited, kubelet sends SIGKILL to forcibly kill all processes.
A
preStop sleep hook (e.g., sleep 15) is essential to give kube-proxy and Ingress controllers time to remove the pod IP from load balancer endpoints before the application stops accepting connections, eliminating 502/504 errors.
25. How do ConfigMaps and Secrets get updated inside running pods?
- Mounted as Volume: Kubelet automatically updates projected volume files within a few seconds via atomic symlink rotation without restarting the pod. However, applications must actively watch the filesystem or reload config upon file change.
- Injected as Environment Variables: Environment variables are resolved at pod startup. Updates to ConfigMaps/Secrets are NOT reflected in running containers; the Pod or Deployment must be restarted (
kubectl rollout restart deployment/app).
26. What is the difference between Opaque, kubernetes.io/tls, and dockerconfigjson Secrets?
Opaque: Default secret type for arbitrary user-defined key-value strings or base64-encoded credentials.kubernetes.io/tls: Containstls.crtandtls.keyfor TLS termination certificates used by Ingress controllers and Gateway API.kubernetes.io/dockerconfigjson: Stores serialized.docker/config.jsonauthentication tokens used byimagePullSecretsto pull private container images.
27. What are Finalizers and what happens when a resource is stuck in 'Terminating'?
If a resource has a finalizer and the responsible controller is deleted or failing, the object remains stuck in
Terminating indefinitely. Emergency fix:
kubectl patch pod/stuck-pod -p '{"metadata":{"finalizers":null}}' --type=merge
28. What is the difference between horizontal pod autoscaling and manual replica scaling?
spec.replicas count via kubectl scale or GitOps commits. HorizontalPodAutoscaler (HPA) dynamically adjusts spec.replicas based on observed metrics (CPU, memory, custom Prometheus queries) using the formula:
desiredReplicas = ceil[currentReplicas * (currentMetricValue / targetMetricValue)]. If an HPA is active, manual scaling changes will be immediately overwritten by HPA's reconciliation loop.
3. Module 3: Networking, Service Discovery & Ingress (Q29–Q42)
Container network interface models, ClusterIP routing, CoreDNS ndots race conditions, Ingress NGINX, and the Gateway API.
29. What are the four core networking tenets of the Kubernetes Network Model?
- All pods can communicate with all other pods on any node without NAT.
- All agents on a node (e.g. kubelet) can communicate with all pods on that same node.
- The IP that a pod sees as its own IP is the same IP that other pods see it as (no internal NAT between pods).
- Nodes can communicate with all pods in the cluster across host interfaces.
30. Compare Kubernetes Service types: ClusterIP, NodePort, LoadBalancer, and ExternalName.
ClusterIP: Default type. Allocates a virtual cluster-internal IP from the service-cluster-ip-range. Only accessible from inside the cluster.NodePort: Exposes the service on a static high-range port (30000–32767) across every worker node's external IP address.LoadBalancer: Provisions a cloud provider load balancer (e.g., AWS NLB/ALB, GCP Cloud LB) that routes external traffic to the NodePort.ExternalName: Maps the service to a CNAME DNS record (e.g.db.external-domain.com) without proxying or allocating cluster VIPs.
31. What is the CoreDNS '5-second DNS delay' bug and how do you resolve it?
/etc/resolv.conf default ndots:5, every single query evaluates 5 local search domains before external resolution.
Production Solutions: 1. Deploy NodeLocal DNSCache on every node to answer DNS queries locally over TCP. 2. In client pod specs, adjust DNS options:
dnsConfig: options: [{name: 'ndots', value: '2'}, {name: 'single-request-reopen'}].
3. Append a trailing dot to external domain names (e.g. api.stripe.com.) to skip search path expansion.
32. What is the difference between Endpoints and EndpointSlices?
Endpoints resource contains a single monolithic list of all pod IPs for a Service. When a service scaled to 5,000+ pods, updating a single pod required rewriting the entire massive Endpoints object, triggering API server serialization bottlenecks and kube-proxy CPU spikes.
EndpointSlices (default in 1.21+) partition endpoints into multiple lightweight resources (up to 100 endpoints per slice). When a single pod updates, only that specific slice is modified, reducing network bandwidth and API server processing from O(N) to O(1).
33. What is an Ingress Controller and how does it route Layer 7 HTTP/HTTPS traffic?
Ingress resources via the API server.
It dynamically generates reverse proxy configuration files (like
nginx.conf) and reloads routes without dropping TCP connections. It terminates TLS certificates, performs path-based (/api/v1) and host-based (app.domain.com) routing, and distributes traffic directly to backend Pod IPs using keep-alive connection pools.
👉 Detailed Architecture: Ingress Controller End-to-End OSI Layer 7 Traffic Flow.
34. How does the new Gateway API differ from the traditional Ingress API?
- Separation of Concerns:
GatewayClass(managed by Cloud/Infrastructure team),Gateway(managed by Cluster Platform team configuring IP, ports, TLS), andHTTPRoute / GRPCRoute / TCPRoute(managed by Application Developers). - Cross-Namespace Routing: Routes can attach to Gateways across different namespaces with
ReferenceGrantsecurity controls. - Native Advanced Traffic Controls: Direct support for header-based routing, traffic splitting/canaries (80/20 weights), request mirroring, and URL rewriting without custom vendor annotations.
35. How does a NetworkPolicy enforce default-deny egress and ingress?
NetworkPolicy selects pods via podSelector and isolates them.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
namespace: production
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
With empty ingress/egress rules, all inbound and outbound traffic is immediately dropped by the CNI plugin (Calico/Cilium) unless explicitly allowed by subsequent white-listing policies.
36. What is externalTrafficPolicy: Local vs Cluster?
externalTrafficPolicy: Cluster(default): Traffic hitting any node's NodePort is forwarded to backend pods across the cluster. May incur an extra network hop across nodes, and masks the client's real source IP with the node's SNAT IP.externalTrafficPolicy: Local: Only routes traffic to pods running on the local node that received the packet. Preserves the client's original source IP and eliminates extra inter-node hops. If a node has no local pods for that service, incoming packets are dropped (health check NodePort routes traffic only to healthy nodes).
37. What happens when a Pod is Running but its Service is inaccessible?
- Check Endpoints: Run
kubectl get endpoints <svc-name>. If empty, verify the Service'sspec.selectormatches the Pod's labels exactly. - Check TargetPort: Verify
targetPortmatches the container's listening port. - Check Readiness Probes: If the pod's readiness probe is failing, it remains in
Runningstate but is omitted from Endpoints. - Check NetworkPolicy: Verify ingress rules allow traffic from the caller's namespace.
- Test Pod Directly:
kubectl execinto caller pod and curl the target Pod IP directly. If pod IP works but ClusterIP fails, check kube-proxy or CNI IPVS/iptables state.
38. What is CNI (Container Network Interface) and how does Calico differ from AWS VPC CNI?
- Overlay CNI (Calico with VXLAN/IPIP): Encapsulates pod packets inside host UDP packets. Pod IPs are independent of the underlying VPC network. Consumes CPU for packet encapsulation and adds 50 bytes of MTU overhead.
- Native Routed CNI (AWS VPC CNI): Allocates secondary real ENI private IP addresses directly from the VPC subnet. No packet encapsulation overhead; pods achieve native AWS network throughput and can communicate directly with RDS, ElastiCache, and on-premises resources via DirectConnect. Limitation: May exhaust VPC subnet IP addresses.
39. What is MTU mismatch in Kubernetes and how does it manifest?
Symptoms: Small HTTP ping/healthcheck packets succeed, but large TLS handshakes (Client Hello certificates) or large database payloads hang indefinitely and time out.
40. How does Headless Service work and when do you use it?
spec.clusterIP: None.
Instead of returning a single load-balanced virtual IP (VIP), CoreDNS returns direct
A records for all backing pod IPs. Clients can directly discover and connect to specific pod replicas. Essential for StatefulSet databases (Kafka brokers, MongoDB replica sets, Elasticsearch cluster discovery) that perform their own client-side load balancing and leader election.
41. What is conntrack table exhaustion and how does it impact Kubernetes nodes?
conntrack table to track the state of all active TCP/UDP connections. When high-volume microservices open millions of short-lived TCP connections without connection pooling, the table reaches nf_conntrack_max.
Once full, the kernel silently drops all new SYN packets with
nf_conntrack: table full, dropping packet. Node-level network connectivity completely halts. Fix: Increase net.netfilter.nf_conntrack_max via sysctl, deploy NodeLocal DNS, and enforce HTTP keep-alive connection reuse.
42. How does Session Affinity work in Kubernetes Services?
service.spec.sessionAffinity: ClientIP with optional sessionAffinityConfig.clientIP.timeoutSeconds (default 10800s / 3 hours). Kube-proxy records the client's IP in Netfilter/IPVS tables and routes repeated requests from that IP to the same backing pod. Note: If traffic arrives through an external HTTP proxy or NAT gateway, all users behind that gateway share the same IP, causing extreme traffic imbalance on a single pod.
4. Module 4: Storage, CSI & Volume Management (Q43–Q54)
Container Storage Interface (CSI), dynamic volume provisioning, storage classes, volume binding modes, and volume expansion.
43. Explain the relationship between StorageClass, PersistentVolume (PV), and PersistentVolumeClaim (PVC).
StorageClass: Defines the storage provisioner (e.g.,ebs.csi.aws.com), disk parameters (gp3, iops, throughput), and reclamation policies. Acts as an automated blueprint for provisioning.PersistentVolumeClaim (PVC): A user's request for storage. Specifies storage capacity (e.g. 50Gi) and access modes (ReadWriteOnce) without caring about underlying hardware.PersistentVolume (PV): The actual storage resource in the cluster provisioned either statically by an admin or dynamically by a CSI provisioner in response to a PVC. Once matched on capacity and access modes, the PV is bound to the PVC in a 1-to-1 relationship.
44. What is the difference between volumeBindingMode: Immediate and WaitForFirstConsumer?
Immediate(legacy default): The storage provisioner creates the cloud disk (e.g. AWS EBS volume) as soon as the PVC is created, picking an arbitrary Availability Zone before the Pod is scheduled. If the scheduler later schedules the Pod in a different AZ, the Pod will fail to start withMulti-Attach errororzone mismatch!WaitForFirstConsumer(production best practice): Delays disk provisioning until a Pod using the PVC is actually scheduled on a specific node. Guarantees the volume is provisioned in the exact Availability Zone where the Pod will run.
45. Compare Access Modes: ReadWriteOnce (RWO), ReadOnlyMany (ROX), ReadWriteMany (RWX), and ReadWriteOncePod (RWOP).
ReadWriteOnce (RWO): Can be mounted as read-write by a single node at a time. Multiple pods on the same node can read/write to it (e.g., AWS EBS, GCP Persistent Disk).ReadOnlyMany (ROX): Can be mounted read-only by many nodes simultaneously.ReadWriteMany (RWX): Can be mounted read-write by multiple pods across multiple nodes simultaneously (e.g., AWS EFS, NFS, CephFS).ReadWriteOncePod (RWOP)(K8s 1.22+): Restricts access to a single Pod in the entire cluster, preventing dual-writer split-brain corruption during pod migrations.
46. What are the three components of a modern Container Storage Interface (CSI) driver?
- CSI Controller Plugin: Runs as a Deployment. Interacts with the cloud API (e.g., AWS EC2 API) to create, delete, attach, and detach disk volumes from virtual machines.
- CSI Node Plugin: Runs as a DaemonSet on every worker node. Responsible for formatting raw block devices with filesystems (ext4/xfs) and mounting the volume into the pod's container directory (NodeStageVolume / NodePublishVolume).
- Kubernetes CSI Sidecars: Open-source helper containers developed by Kubernetes storage SIG (
external-provisioner,external-attacher,external-resizer,node-driver-registrar) that bridge K8s API events to CSI gRPC calls.
47. How does dynamic PVC volume expansion work, and what are the limitations?
allowVolumeExpansion: true.
The user edits the PVC:
kubectl patch pvc data-pvc -p '{"spec":{"resources":{"requests":{"storage":"100Gi"}}}}'.
- The
external-resizersidecar calls the cloud provider to expand the underlying disk. - The
kubeleton the node resizes the filesystem (resize2fsorxfs_growfs) once the volume is mounted.
48. What causes 'Multi-Attach error for volume' and how do you resolve it?
Resolution steps: 1. Verify if the pod on the old node is completely terminated:
kubectl get pod <name> -o wide.
2. If the old node is NotReady, safely force terminate the dead pod or check VolumeAttachment objects: kubectl get volumeattachment.
3. If necessary, delete the orphaned VolumeAttachment object or detach the volume manually in AWS EC2 Console.
49. What is the difference between ReclaimPolicy: Retain vs Delete?
Delete(default for dynamic StorageClasses): Deleting the PVC automatically triggers the deletion of the associated PV and the underlying cloud disk in AWS/GCP, destroying all data.Retain: Deleting the PVC does NOT delete the PV or cloud disk. The PV transitions toReleasedstatus. Data remains intact for disaster recovery, but the PV cannot be bound to a new PVC until an administrator manually scrubs the claimRef.
50. What is emptyDir volume and what are its performance caveats?
emptyDir volume is created when a Pod is assigned to a node and exists as long as that Pod runs on that node. It starts empty and is wiped when the Pod is removed.
Caveat: By default,
emptyDir writes to the node's root filesystem (/var/lib/kubelet/pods/). Heavy write workloads can consume root disk space, triggering kubelet DiskPressure evictions!
Optimization: Set
emptyDir: { medium: Memory } to mount a RAM-backed tmpfs for high-performance caches, but remember it consumes pod memory limits.
51. What is VolumeSnapshot and how do you restore a PVC from a snapshot?
VolumeSnapshot (CSI snapshotter) takes a point-in-time storage backup using the storage system's native snapshot mechanism.
To restore, create a new PVC with
dataSource pointing to the VolumeSnapshot:
spec:
dataSource:
name: db-backup-snapshot
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
resources:
requests:
storage: 100Gi
52. What is subPath in volume mounts and what issue does it solve?
volumeMounts.subPath allows mounting a specific subdirectory inside a single shared volume rather than mounting the volume root.
Useful when multiple containers in a Pod share a single PersistentVolume, or when an application expects a specific folder name (e.g.
/var/lib/mysql/data) but mounting the root volume would overwrite the container image's default directory files.
53. What is Projected Volume and what resource types does it combine?
secretconfigMapdownwardAPI(pod labels, annotations, pod IP)serviceAccountToken(time-bound, audience-scoped OIDC tokens)
54. How do you prevent StatefulSet PVC data loss during accidental helm delete?
volumeClaimTemplates when the StatefulSet or Helm release is deleted. The PVCs and cloud disks remain in Bound status. To recover, simply reinstall the Helm release with the exact same name; the new StatefulSet pods automatically reattach to the existing, un-deleted PVCs.
5. Module 5: Security, RBAC & Admission Control (Q55–Q68)
The 4C cloud-native security model, RBAC policies, ServiceAccount projected tokens, Pod Security Standards, and KMS envelope encryption.
55. What is the 4C Security Model in Cloud-Native Kubernetes?
- Cloud: Securing the underlying infrastructure (VPC isolation, IAM roles, security groups, KMS keys).
- Cluster: Securing Kubernetes components (API server access, RBAC, etcd encryption, audit logging, network policies).
- Container: Securing container execution (distroless images, vulnerability scanning, non-root users, read-only root filesystems).
- Code: Securing application logic (SAST/DAST testing, dependency vulnerability scans, TLS termination).
56. What is the difference between a Role and a ClusterRole, RoleBinding and ClusterRoleBinding?
Role: Namespaced. Grants permissions (verbs on resources) strictly within a single namespace.ClusterRole: Non-namespaced. Grants permissions cluster-wide (e.g., viewing Nodes, PVs, or resources across all namespaces).RoleBinding: Binds a Role (or ClusterRole) to subjects (Users, Groups, ServiceAccounts) scoped strictly within a specific namespace.ClusterRoleBinding: Binds a ClusterRole to subjects across the entire cluster (e.g., cluster-admin).
57. How do Bound Service Account Tokens work in modern Kubernetes (1.24+)?
In 1.24+ (Projected ServiceAccount Tokens), kubelet requests time-bound, audience-restricted OIDC tokens directly from the TokenRequest API. The tokens expire automatically (default 1 hour), are rotated automatically by kubelet, and are bound to the specific pod lifecycle—if the pod is deleted, the token is instantly invalid, eliminating credential leakage risk.
58. What are Pod Security Standards (PSS) and how do you enforce them?
- Privileged: Unrestricted; allows root access, hostPID, hostNetwork. Intended for system daemons.
- Baseline: Prevents known privilege escalations; blocks host namespaces and privileged capabilities.
- Restricted: Hardened production profile; requires non-root execution, drops all capabilities except NET_BIND_SERVICE, and enforces read-only root filesystems.
kubectl label ns production pod-security.kubernetes.io/enforce=restricted pod-security.kubernetes.io/warn=restricted
59. How does etcd KMS Envelope Encryption protect Secrets at rest?
With KMS Envelope Encryption, the API server uses a local Data Encryption Key (DEK) to encrypt secrets with AES-GCM. The DEK is then encrypted using a Key Encryption Key (KEK) managed by an external Key Management Service (AWS KMS, HashiCorp Vault). Plaintext keys are never persisted to disk.
60. What is securityContext and what are the mandatory production settings?
securityContext:
runAsNonRoot: true
runAsUser: 10001
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
These guardrails guarantee that even if an attacker executes remote code execution inside the container, they cannot elevate privileges, modify system binaries, or access host kernel primitives.
61. How does IAM Roles for Service Accounts (IRSA) work in AWS EKS?
- EKS establishes an OIDC identity provider in AWS IAM.
- A Kubernetes ServiceAccount is annotated with the IAM Role ARN:
eks.amazonaws.com/role-arn: arn:aws:iam::... - The pod injects a projected OIDC token and AWS environment variables (
AWS_WEB_IDENTITY_TOKEN_FILE). - The AWS SDK calls
sts:AssumeRoleWithWebIdentity, trading the Kubernetes token for temporary 15-minute AWS credentials scoped strictly to that specific Pod.
62. How do you audit who deleted or modified a production resource using Kubernetes Audit Logs?
RequestReceived, ResponseStarted, ResponseComplete, and Panic.
Query the audit log (CloudWatch / Elasticsearch) for the HTTP method, URI, and user identity:
jq 'select(.verb == "delete" and .objectRef.resource == "deployments") | {user: .user.username, time: .requestReceivedTimestamp, name: .objectRef.name, namespace: .objectRef.namespace}' /var/log/kubernetes/audit.log
63. What is the difference between ServiceAccount and User account in Kubernetes?
- User Account: Represents human operators or external CI/CD processes. Kubernetes does not have a User database; users are managed externally via X.509 client certs, OpenID Connect (Okta, Google), or webhook authenticators.
- ServiceAccount: Represents in-cluster software agents and pods managed natively via the Kubernetes API server within specific namespaces.
64. What are Linux Capabilities and why should you drop ALL in container specs?
CAP_CHOWN, CAP_NET_RAW, CAP_SYS_ADMIN). Standard Docker containers default to granting 14 capabilities. Dropping ALL capabilities strips potential attack vectors (like ARP spoofing or packet sniffing) that an attacker could use if container code is compromised.
65. What is Seccomp and AppArmor/SELinux in Kubernetes?
- Seccomp (Secure Computing Mode): Restricts which Linux system calls (syscalls) a container process can execute. The
RuntimeDefaultprofile blocks ~50 dangerous syscalls (likereboot,sys_chroot). - AppArmor / SELinux: Mandatory Access Control (MAC) systems that enforce granular filesystem, network, and process execution permissions on the host operating system.
66. What is the purpose of imagePullSecrets and what happens if it is misconfigured?
imagePullSecrets contains authentication credentials to pull images from private registries (AWS ECR, DockerHub, Quay). If omitted, misconfigured, or if credentials have expired, the pod scheduling halts in ImagePullBackOff or ErrImagePull with an HTTP 401 Unauthorized or 403 Forbidden error.
67. How do you prevent container breakout vulnerabilities?
- Never set
privileged: true. - Never mount the host Docker socket (
/var/run/docker.sock) or host root filesystem. - Enforce non-root user execution (
runAsNonRoot: true). - Keep host kernel and container runtimes (containerd, runc) patched against CVEs.
- Utilize sandboxed runtimes like gVisor (runsc) or Kata Containers for untrusted multi-tenant workloads.
68. What is NetworkPolicy egress filtering for PCI-DSS and SOC2 compliance?
6. Module 6: Scheduling, Autoscaling & Resource Quotas (Q69–Q82)
QoS classes, CFS CPU throttling, HPA v2 algorithms, VPA, Karpenter vs Cluster Autoscaler, and node affinity rules.
69. Explain the three Kubernetes Quality of Service (QoS) classes.
- Guaranteed: Every container in the Pod has both CPU and Memory requests and limits set, and
requests == limitsfor all resources. Highest priority; never evicted unless the node is terminating or out of memory. - Burstable: At least one container has requests or limits specified, but requests and limits do not match. Evicted during node memory pressure after BestEffort pods are terminated.
- BestEffort: No container specifies any CPU or memory requests or limits. First candidates to be killed via OOM killer during node memory pressure.
70. What is Linux CFS Quota Throttling and why do CPU limits cause latency spikes?
cfs_period_us: 100000). If a container with a limit of 1 CPU executes 100ms of work in the first 20ms of the period, the Linux kernel completely throttles the process for the remaining 80ms!
This causes severe latency spikes and p99 timeouts in multi-threaded runtimes (Go, Java, Node.js). Best practice in modern production: Set CPU requests accurately for scheduling, but remove or dramatically increase CPU limits, relying instead on node autoscaling.
71. What is the difference between Taints & Tolerations vs Node Affinity?
- Taints: Applied to nodes to repel pods unless the pod explicitly has a matching toleration. Syntax:
key=value:Effect(NoSchedule,PreferNoSchedule,NoExecute). Used to dedicate nodes to GPU or batch workloads. - Node Affinity: Configured on pods to attract them to specific nodes based on node labels (e.g.
topology.kubernetes.io/zone: us-east-1a). Can be hard (requiredDuringSchedulingIgnoredDuringExecution) or soft (preferredDuringSchedulingIgnoredDuringExecution).
72. What is Pod Anti-Affinity and TopologySpreadConstraints?
podAntiAffinity: Prevents pods from running on the same node or availability zone as other pods with matching labels, ensuring high availability across failure domains.topologySpreadConstraints: Provides granular control over how pods are distributed across topology keys (zones, hosts, racks). Governed bymaxSkew(the maximum allowable difference in pod count between any two zones), preventing cluster imbalances.
73. How does Horizontal Pod Autoscaler (HPA) v2 scale on custom and external metrics?
custom.metrics.k8s.io) or external metrics API (external.metrics.k8s.io) served by adapters like Prometheus Adapter or Datadog Metric Provider.
Enables scaling on business-critical telemetry such as SQS queue length, RabbitMQ message backlog, HTTP request rate (RPS), or API response latency rather than lagging CPU metrics.
74. Compare Karpenter vs the traditional Cluster Autoscaler.
- Cluster Autoscaler: Tightly coupled to cloud Node Groups / Auto Scaling Groups (ASGs). When a pod is pending, it triggers an ASG scale-out. Slow (takes 2–4 minutes to launch nodes) and bound to predefined EC2 instance types.
- Karpenter: Group-less, dynamic autoscaler developed by AWS. Directly evaluates unscheduled pod resource requests, taints, and architecture constraints, and calls cloud fleet APIs to provision the exact optimal mix of Spot and On-Demand instances in seconds. Consolidates underutilized nodes automatically to slash cloud spend.
75. What is Vertical Pod Autoscaler (VPA) and can it run alongside HPA?
Can they run together? Only if HPA scales on custom/external business metrics (like SQS queue depth or HTTP RPS). If both HPA and VPA scale based on CPU/memory, they will create race conditions and thrash pod counts.
76. What is a ResourceQuota vs a LimitRange?
LimitRange: Enforces constraints on individual containers or pods within a namespace (min/max CPU, default requests/limits if omitted by developer).ResourceQuota: Enforces hard ceilings on the aggregate resource consumption of an entire namespace (total CPU requests, total memory limits, max number of Pods, Services, or PVCs). Prevents a single team from starving the cluster.
77. What happens when a node experiences MemoryPressure vs DiskPressure?
memory.available < 100Mi):
MemoryPressure: Kubelet evicts pods based on their QoS class and memory usage relative to requests (BestEffort killed first, then Burstable exceeding requests).DiskPressure: Kubelet first cleans up unused container images and dead containers. If pressure persists, it evicts pods consuming significant local ephemeral storage.
78. How does PriorityClass determine pod preemption?
PriorityClass defines an integer priority (e.g., 1000000 for critical system pods). When cluster resources are exhausted and a high-priority pod is unscheduled, the scheduler initiates preemption: it evicts lower-priority pods from a node to free sufficient CPU and memory for the high-priority pod to schedule.
79. What is the difference between hard and soft pod eviction thresholds?
- Hard eviction threshold (e.g., memory.available < 100Mi): Kubelet immediately evicts pods without waiting for grace periods (sends SIGKILL).
- Soft eviction threshold (e.g., memory.available < 500Mi for 90s): Kubelet monitors the condition for the duration period; if unresolved, it evicts pods honoring their
terminationGracePeriodSeconds.
80. What is overcommit in Kubernetes and what are the risks?
81. How does the scheduler handle Node Affinity 'preferredDuringScheduling' weights?
preferredDuringSchedulingIgnoredDuringExecution), each preference clause is assigned a weight from 1 to 100. The scheduler iterates through candidate nodes, evaluates matched label expressions, and adds the weight score to each node's total ranking. Nodes with the highest combined score are selected, but scheduling will still succeed on lower-scoring nodes if preferred ones are unavailable.
82. What is scale-down stabilization in HPA?
behavior.scaleDown.stabilizationWindowSeconds (default 300s / 5 minutes), instructing the controller to evaluate the peak desired replica count observed over the past 5 minutes before executing pod termination.
7. Module 7: Observability, Metrics & Health Probes (Q83–Q92)
Liveness vs Readiness vs Startup probes, metrics-server architecture, Prometheus Operator, OpenTelemetry, and container logging.
83. Compare Liveness, Readiness, and Startup Probes.
- Startup Probe: Checks if the application has completed initialization. All other probes are disabled until the startup probe succeeds. Prevents slow-starting legacy apps (like Java JVM) from being prematurely killed by liveness probes.
- Liveness Probe: Checks if the container is healthy and running. If it fails, kubelet terminates the container and restarts it according to
restartPolicy. - Readiness Probe: Checks if the container is ready to accept user network traffic. If it fails, the pod IP is immediately stripped from Service Endpoints and Ingress routing without restarting the container.
84. What is the danger of pointing a Liveness probe to an external database dependency?
/healthz liveness probe queries an external database, and that database experiences latency or an outage, every single pod in your cluster will fail its liveness probe simultaneously! Kubelet will kill and restart all pods in a catastrophic crash loop, amplifying database connection pressure when it recovers.
Rule of thumb: Liveness probes must only check local in-process deadlocks; only Readiness probes should inspect external dependencies.
85. How does metrics-server collect resource data and why does it not store historical metrics?
metrics-server polls node kubelets over HTTPS (querying the internal cAdvisor summary API) every 60 seconds to retrieve instantaneous CPU and memory metrics. It exposes these metrics via the metrics.k8s.io API for HPA and kubectl top.
It purposefully keeps metrics strictly in volatile memory (RAM) and discards history to maintain lightweight, sub-second response times without thrashing etcd.
86. What is Prometheus Operator and how does ServiceMonitor work?
ServiceMonitor: Declaratively specifies how groups of Services should be scraped. Matches services using label selectors and defines scrape interval, endpoint path (e.g./metrics), and port.- The operator watches ServiceMonitors and dynamically writes scrape configurations into Prometheus configuration files without requiring manual Prometheus restarts.
87. How does Kubernetes container logging work under the hood?
/var/log/pods/<pod-name>/<container-name>/*.log.
When you run
kubectl logs, kubelet reads these local files and streams them back via the API server. In production, a DaemonSet agent (Fluentbit / Vector) tail-reads these files, enriches logs with pod metadata, and ships them to centralized storage (OpenSearch, Loki).
88. What is the difference between stdout/stderr logging and writing logs to local container files?
kubectl logs cannot read them. Cloud-native best practice: Applications must strictly stream structured JSON logs to stdout/stderr.
89. What is OpenTelemetry (OTel) Collector and how is it deployed in Kubernetes?
Common deployment topologies:
- DaemonSet (Agent): Collects host metrics and receives OTLP traces from pods over localhost:4317.
- Deployment (Gateway): Centralized collector pool handling batching, sampling, credential enrichment, and forwarding to storage backends (Jaeger, Datadog).
90. How do you monitor CoreDNS performance and detect DNS bottlenecks?
coredns_dns_request_duration_seconds_bucket: Measures DNS query response latency.coredns_dns_responses_total{rcode="SERVFAIL"}: Measures server failure responses.coredns_cache_hits_totalvscoredns_cache_misses_total: Evaluates DNS cache hit ratio.
91. What is distributed tracing context propagation across microservices?
traceparent, tracestate) into all outgoing HTTP/gRPC client calls. Allows APM tools to visualize the end-to-end distributed transaction as a single unified trace waterfall.
92. How do you configure Audit Policy rules to balance security and log volume?
None, Metadata, Request, and RequestResponse.
Production best practice: Set
None for noisy high-frequency read endpoints (endpoints, kube-proxy token leases), Metadata for routine read requests, and RequestResponse for all mutations on critical resources (Secrets, Roles, RoleBindings, Nodes).
8. Module 8: SRE Incident Triage & Production Runbooks (Q93–Q105)
Battle-tested diagnostic flows for CrashLoopBackOff, OOMKilled exit codes, ImagePullBackOff, Pending pods, and etcd disaster recovery.
93. What is the systematic 6-step diagnostic flow for CrashLoopBackOff?
- Inspect Exit Code & Reason:
kubectl describe pod <pod>→ CheckLast State: Terminated,Exit Code, andReason. - Read Crash Logs:
kubectl logs <pod> --previous(reads logs from the crashed container before restart). - Check Exit Code Meanings:
Exit Code 0: Application finished normally but shouldn't have (missing foreground loop).Exit Code 1/2: Application code exception, missing configuration, syntax error.Exit Code 137: OOMKilled (Killed by Linux SIGKILL signal 9, 128+9).Exit Code 139: Segmentation fault (SIGSEGV signal 11, 128+11).Exit Code 143: Graceful termination via SIGTERM (signal 15, 128+15).
- Verify Dependencies: Test database connectivity, Vault tokens, and external secrets.
- Check Liveness Probe: Determine if an aggressive liveness probe is killing the container before startup.
- Interactive Debugging: Override entrypoint with
sleep 3600to inspect container environment locally.
94. What is the difference between OOMKilled exit code 137 triggered by cgroups vs host Linux OOM killer?
- Cgroup Limit OOMKilled: The container exceeded its Kubernetes memory limit. The Linux kernel kills the individual container process. The host node remains completely healthy and unimpacted.
kubectl describe podshowsReason: OOMKilled. - Host Node OOM: The entire worker node ran out of physical memory (due to overcommit or BestEffort pods). The kernel OOM killer activates globally and terminates processes with the highest
oom_score_adjto protect the kernel, often evicting pods without recording clean Kubernetes events.
95. What are the common root causes for a Pod stuck in 'Pending'?
kubectl describe pod <pod> under Events:
- Insufficient Node Resources:
0/12 nodes are available: 12 Insufficient cpu/memory→ Scale node group or adjust pod requests. - Unsatisfied NodeAffinity / NodeSelector: No node matches the pod's label constraints.
- Taints and Tolerations: Nodes have taints that the pod cannot tolerate.
- Unbound PVC:
pod has unbound immediate PersistentVolumeClaims→ StorageClass or CSI driver issue. - Node Port Conflicts: Multiple pods attempting to bind to the same host port.
96. What causes ImagePullBackOff and how do you triage it in under 60 seconds?
- Run
kubectl describe pod <pod> | grep -A 5 -i "Failed to pull image". - Typo in image tag or registry name: Verify image tag exists in repository.
- Private registry authentication failure: Missing or expired
imagePullSecretsor incorrect IAM role permissions for ECR. - Docker Hub Rate Limiting: Exceeded 100 pulls/6 hours anonymously (HTTP 429 Too Many Requests). Fix: Authenticate with DockerHub or mirror to AWS ECR.
97. What causes a Node to transition to 'NotReady' status and what are your first 3 commands?
NotReady when the node-controller has not received a heartbeat from the node's kubelet for node-monitor-grace-period (default 40s).
First 3 commands:
# 1. Inspect node events and conditions
kubectl describe node <node-name>
# 2. Check if kubelet systemd service is active on host
ssh <node-ip> "systemctl status kubelet"
# 3. Inspect recent kubelet error logs
ssh <node-ip> "journalctl -u kubelet -e --no-pager -n 50"
Common causes: Kubelet crash, OOM, disk space exhausted on /var/lib/docker, or network partition.
98. How do you perform a zero-downtime Amazon EKS cluster upgrade?
- Pre-upgrade audit: Check deprecated API versions using
plutoorkubent. - Upgrade Control Plane: Update EKS cluster version via AWS Console / Terraform. EKS upgrades the managed control plane nodes one by one.
- Upgrade Core Add-ons: Upgrade
vpc-cni,kube-proxy, andcorednsto match the target Kubernetes minor version. - Upgrade Worker Nodes: Provision a new Node Group with the updated AMI. Cordon the old node group (
kubectl cordon) and drain nodes sequentially (kubectl drain --ignore-daemonsets --delete-emptydir-data), respecting PodDisruptionBudgets. - Post-upgrade validation: Verify all services, endpoints, and ingress routing are functional before terminating old node groups.
99. How do you take an etcd snapshot and restore it in an emergency?
# 1. Take etcd snapshot
ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key snapshot save /tmp/etcd-backup-$(date +%F).db
# 2. Restore etcd snapshot to a new data directory
ETCDCTL_API=3 etcdctl --data-dir=/var/lib/etcd-restored snapshot restore /tmp/etcd-backup-2026-10-12.db
# 3. Update static pod manifest (/etc/kubernetes/manifests/etcd.yaml) to point to /var/lib/etcd-restored
100. What is 'split-brain' in distributed systems and how does etcd prevent it?
etcd completely prevents split-brain by requiring an absolute majority quorum (N/2)+1 for leader election and write commits. In a partition, only the subset containing more than 50% of members can elect a leader and accept writes; the minority subset refuses writes, preserving data integrity.
101. What is the difference between graceful node drain and forced node termination?
kubectl drain <node>: Cordons the node (marks it unschedulable), contacts the Eviction API, honors PodDisruptionBudgets, invokes preStop hooks, and gives applications up to their termination grace period to terminate gracefully.- Forced termination (e.g. terminating AWS EC2 instance directly): Bypasses Kubernetes coordination. Pods immediately drop connections without warning, risking in-flight database transaction corruption and transient 502 Bad Gateway errors for end users.
102. What happens if CoreDNS pods crash across the entire cluster?
payment-svc.prod.svc.cluster.local) or external APIs (api.stripe.com) will timeout immediately.
Running pods with established keep-alive TCP connections continue functioning, but any new connection or lookup fails. Mitigation: Run CoreDNS as an autoscaled deployment with at least 3 replicas spread across distinct AZs, with PDB
minAvailable: 2, and deploy NodeLocal DNSCache.
103. What is an admission webhook deadlock and how do you recover?
failurePolicy: Fail, but the webhook service itself crashes or cannot schedule pods (e.g., after cluster reboot). Because the API server cannot reach the webhook, it rejects all incoming pod creations—including the pods needed to run the webhook!
Recovery:
# Temporarily disable the failing validating webhook configuration
kubectl get validatingwebhookconfigurations
kubectl delete validatingwebhookconfiguration <failing-webhook>
104. How do you troubleshoot intermittent high latency across Kubernetes services?
- Check CPU Throttling: Inspect Prometheus metric
container_cpu_cfs_throttled_periods_total. - Check CoreDNS Latency: Measure DNS lookup times inside pods using
digordnsping. - Check conntrack tables: Verify whether nodes are reaching
nf_conntrack_maxlimits. - Check CNI / Network interface drops: Run
ethtool -S eth0on worker nodes to inspect packet drops and ring buffer overruns. - Check Ingress keep-alive connection reuse: Ensure ingress controllers reuse backend connections rather than establishing new TCP/TLS handshakes on every request.
105. What is the Golden Rule of Kubernetes Production Engineering?
Mastering Kubernetes requires active recall under real exam conditions. Test your instincts with Kubernetes Mastery Quizzes, drill interactive troubleshooting with the kubectl Crash Simulator Game, or practice high-pressure scenario interviews in our Timed DevOps & SRE Scenario Simulator.