Interview Q&A · questions with model answers
Kubernetes Interview Questions
Part of the study plan for: DevOps Engineer · Site Reliability Engineer (SRE) · Cloud Engineer
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked What is GitOps, and how do Argo CD or Flux implement it?
GitOps uses Git as the source of truth for desired cluster state: changes are made by pull request, and an in-cluster agent (Argo CD or Flux) continuously pulls the repository and reconciles the…
-
Most asked What are Kubernetes namespaces, when should you create them, and what isolation do they provide?
Namespaces partition a cluster into virtual sub-clusters that scope names, RBAC policies, resource quotas and network policies. They isolate teams and environments logically but do not isolate…
-
Most asked What is the reconciliation loop, and why is Kubernetes called declarative?
You declare the desired state of objects (three replicas of this image), and controllers run loops that observe the actual state, compare it with the desired state, and act to close the gap. You do…
-
Most asked What are NetworkPolicies, and how would you lock down traffic in a namespace?
NetworkPolicies are firewall rules for pods: they select pods by label and allow specific ingress and egress traffic by pod selector, namespace selector, IP block and port. By default all pods can…
-
Most asked What are Custom Resource Definitions and operators?
A CRD adds a new resource type to the Kubernetes API (for example PostgresCluster or Certificate). An operator is a controller that watches those custom resources and reconciles real systems to…
-
Most asked What is Kubernetes not good at, or when would you avoid it?
Kubernetes adds substantial operational complexity: networking, security, upgrades, observability and a large ecosystem to learn. For a small team with a few services, a PaaS, serverless functions,…
-
Most asked What do the common kubectl debugging commands tell you?
kubectl get (status), describe (configuration and events), logs (--previous, -f, -c container), exec (shell into a running container), debug (ephemeral debug container or a copy of a pod or node),…
-
What is a Pod, and why are containers grouped into Pods?
A Pod is the smallest deployable unit: one or more containers that share a network namespace (one IP, they reach each other on localhost), can share volumes, and are always scheduled together on the…
-
What is a PodDisruptionBudget, and why does it matter?
A PDB limits voluntary disruptions (node drains for upgrades, autoscaler scale-down, evictions through the Eviction API) for a set of pods: for example minAvailable: 2 or maxUnavailable: 1. Drains…
-
What are the pod lifecycle phases, and how do you use them for debugging?
A pod moves through Pending, Running, Succeeded, Failed and Unknown phases. The phase tells you where in the lifecycle the problem is: scheduling (Pending), runtime (Running with restarts),…
-
What are init containers and sidecar containers?
Init containers run to completion, in order, before the app containers start: wait for a dependency, run a setup step, fetch configuration. Sidecar containers run alongside the main container for…
-
What are admission controllers and webhooks used for?
Admission controllers intercept API requests after authentication and authorisation and before objects are stored. Mutating admission can change objects (inject sidecars, add defaults or labels);…
-
What is etcd's role, and what can go wrong with it?
etcd is the consistent, distributed key-value store (using the Raft consensus algorithm) that holds every Kubernetes object. The cluster needs a majority (quorum) of etcd members to accept writes,…
-
What is a service mesh, and when is it worth it?
A service mesh (Istio, Linkerd, Cilium service mesh) adds a data plane, traditionally sidecar proxies and more recently node-level or ambient proxies, that handles service-to-service traffic: mutual…
-
What are ResourceQuota and LimitRange?
A ResourceQuota caps the total resources a namespace may use (CPU and memory requests and limits, number of pods, Services, PVCs, storage); a LimitRange sets default and minimum/maximum requests and…
-
What is the Kubernetes container runtime, and why was dockershim removed?
The kubelet talks to the container runtime through the Container Runtime Interface (CRI); common runtimes are containerd and CRI-O, which use runc (or sandboxed runtimes) to run OCI containers.…
-
What are priority classes and preemption?
PriorityClasses give pods a priority; when the cluster is full, the scheduler can preempt (evict) lower-priority pods to make room for higher-priority ones. System components use the built-in…
-
What are ephemeral containers and kubectl debug used for?
Ephemeral containers are temporary containers added to a running pod for troubleshooting; they share the pod's namespaces, so you can inspect processes and network from a tools image even when the…