Kubernetes Interview Questions and Answers
By Ilya Subach, DevOps engineer · Updated July 22, 2026
Stop reading, start practicing: Paste the job description, get a free tailored prep plan — no account.
Paste your JD →See a live demoThis guide is for engineers preparing for Kubernetes-heavy interviews: DevOps, platform, SRE, and backend roles where k8s is on the job description. It covers what interviewers actually probe at each level, from the conceptual basics through the hands-on troubleshooting that separates a junior from a senior. Every question below comes with a model answer you can adapt, plus the commands and gotchas that show you have run these systems in production.
Reading answers is not the same as being able to fix a broken cluster while someone watches. The strongest preparation pairs concept review with real debugging reps. prepme.io turns a pasted job description into a free briefing that surfaces hands-on Kubernetes and Terraform labs, an architecture design round, and a resume-based mock interview, so you practice on the exact stack the role expects rather than generic trivia.
What Kubernetes interviews actually test, by seniority
Kubernetes interviews are layered, and the level you are interviewing for changes what counts as a good answer. Juniors are expected to define the core objects and explain the declarative model: you describe desired state in YAML, the API server persists it to etcd, and controllers reconcile actual state toward it. Mid-level candidates must connect objects into working systems, reason about failure modes, and read the output of kubectl describe and kubectl logs fluently. Senior and staff candidates are judged on trade-offs, blast radius, multi-tenancy, security posture, and how they would design and operate clusters at scale.
A reliable tell of seniority is whether you reach for the right diagnostic command unprompted. A junior says a pod is broken; a senior says kubectl describe pod shows the events, kubectl get events --sort-by=.lastTimestamp gives the timeline, and kubectl logs --previous shows the last crash. Interviewers also watch for honest scoping: knowing what you would check first, second, and third under time pressure beats reciting every possible cause.
- Junior: define pods, Deployments, Services, namespaces; explain desired vs actual state and the reconciliation loop.
- Mid: wire objects together, read describe/logs/events, explain rolling updates, probes, and resource requests vs limits.
- Senior: design for multi-tenancy and least-privilege RBAC, reason about scheduling and capacity, debug live incidents, and justify trade-offs.
- All levels: show a deliberate diagnostic order rather than guessing.
Core concepts: pods, Deployments, Services, namespaces
The pod is the smallest deployable unit and the atom of scheduling: one or more containers that share a network namespace (same IP and port space) and can share volumes. You rarely create bare pods in production because nothing reschedules them when a node dies. Instead a Deployment manages a ReplicaSet, which manages pods, giving you declarative scaling, rolling updates, and rollbacks (kubectl rollout status, kubectl rollout undo). StatefulSets are the equivalent for workloads needing stable network identity and per-pod persistent storage; DaemonSets run one pod per node for agents like log shippers or CNI components.
A Service gives a stable virtual IP and DNS name in front of an ephemeral set of pods selected by labels, load-balancing across the ready endpoints. ClusterIP is internal-only, NodePort exposes a static port on every node, and LoadBalancer provisions an external load balancer via the cloud provider. The Service decouples callers from pod churn: pods come and go, the Service name stays constant. Namespaces are virtual partitions for scoping names, applying ResourceQuotas and RBAC, and organizing tenants or environments, but they are not a hard security boundary by themselves; cross-namespace network traffic is allowed by default and must be restricted with NetworkPolicies.
- Deployment manages ReplicaSet manages pods; never depend on bare pods for HA.
- Labels and selectors are the glue: Services, ReplicaSets, and NetworkPolicies all target pods by label.
- StatefulSet for stable identity and storage; DaemonSet for one-per-node agents; Job/CronJob for batch and scheduled work.
- Namespaces scope names and policy, not network isolation by default.
Networking, storage, and config: Ingress, DNS, PV/PVC, ConfigMaps, Secrets
Cluster DNS (CoreDNS) makes Services discoverable by name. A Service named api in namespace prod resolves at api.prod.svc.cluster.local, and same-namespace callers can just use api. An Ingress is not a Service type; it is an L7 routing layer that maps hostnames and paths to backend Services, and it does nothing without an Ingress controller (ingress-nginx, Traefik, or a cloud controller) actually running and watching Ingress objects. A classic interview trap is claiming you created an Ingress and it should work, when no controller is installed to act on it. (Newer clusters increasingly use the Gateway API for the same job, so mentioning it signals you are current.)
Storage uses the PersistentVolume and PersistentVolumeClaim split: a PVC is the workload's request for storage (size, access mode), and it binds to a PV that satisfies it, usually provisioned dynamically through a StorageClass. Access modes matter: ReadWriteOnce allows read-write by pods on a single node, so a multi-replica Deployment whose pods land on different nodes and share one RWO volume will get pods stuck Pending or ContainerCreating because the volume cannot attach to a second node. ConfigMaps hold non-sensitive configuration and Secrets hold sensitive values; both can be mounted as files or injected as environment variables. Remember that stock Secrets are only base64-encoded, not encrypted at rest unless you enable an encryption provider, and changes to a mounted ConfigMap propagate to the file but the process must be designed to reload (env-var injections do not update a running pod at all).
- CoreDNS: service.namespace.svc.cluster.local; cross-namespace calls need the namespace in the name.
- Ingress needs a running controller; the object alone routes nothing. Gateway API is the modern successor.
- ReadWriteOnce volumes attach to one node; this is a common cause of Pending pods on scale-out.
- Secrets are base64, not encrypted by default; enable encryption at rest and tight RBAC.
Scheduling, reliability, and RBAC: probes, quotas, ServiceAccounts, least-privilege
The scheduler places pods based on resource requests, node selectors, affinity and anti-affinity, taints and tolerations, and topology spread constraints. Requests reserve capacity and drive scheduling; limits cap usage at runtime. Get this wrong and you either pack nodes too tightly (no headroom, evictions) or waste capacity. A pod whose requests no node can satisfy stays Pending, and kubectl describe pod will show the FailedScheduling event explaining exactly which predicate failed (Insufficient cpu, Insufficient memory, untolerated taint).
Reliability hinges on probes. A liveness probe restarts a hung container; a readiness probe removes a pod from Service endpoints until it is ready (without restarting it); a startup probe protects slow-booting apps from being killed by liveness before they finish initializing. A common production outage is a liveness probe that is too aggressive, restarting healthy-but-busy pods into a CrashLoop. On security, every pod runs as a ServiceAccount, and RBAC (Roles and ClusterRoles bound by RoleBindings and ClusterRoleBindings) governs what that identity can do. The senior-level answer is least privilege: grant a namespaced Role with only the verbs and resources a workload needs, never bind the cluster-admin ClusterRole to application identities, and prefer per-namespace scoping so a compromised pod cannot read or write outside its own namespace.
- Requests drive scheduling and reserve capacity; limits cap runtime usage; set both deliberately.
- Liveness restarts, readiness gates traffic, startup protects slow boots; do not conflate them.
- RBAC verbs and resources scoped by Role/ClusterRole + bindings; default to namespaced least-privilege.
- Use ResourceQuota and LimitRange per namespace to stop a noisy tenant from starving the cluster.
Troubleshooting: CrashLoopBackOff, ImagePullBackOff, Pending, OOMKilled
Live troubleshooting is where senior interviews are won or lost, and the discipline is always the same: kubectl get pods to see status, kubectl describe pod for events, and kubectl logs (add --previous to read the crashed instance). CrashLoopBackOff means the container keeps exiting and Kubernetes is backing off (exponentially, capped at five minutes) between restarts; the cause is almost always in the logs of the previous attempt: a bad config or missing env var, a failed dependency at startup, a non-zero exit, or an over-aggressive liveness probe. The status itself is a symptom, not a diagnosis, so never stop at the name.
ImagePullBackOff and ErrImagePull are registry problems: a wrong image name or tag, a private registry with no imagePullSecret, rate limiting, or the node having no network path to the registry. kubectl describe pod shows the exact pull error. Pending means the scheduler cannot place the pod: insufficient CPU or memory across all nodes, an unsatisfiable nodeSelector or affinity rule, an untolerated taint, or a PVC that will not bind (for example a ReadWriteOnce volume already attached on another node). OOMKilled appears as the container's last state with reason OOMKilled and exit code 137 (128 + SIGKILL): the process exceeded its memory limit and the cgroup OOM killer terminated it. The fix is to right-size the memory limit, find the leak or unbounded buffer, and confirm requests and limits reflect real usage measured under load.
- CrashLoopBackOff: read kubectl logs --previous; check config, env, dependencies, and probe aggressiveness.
- ImagePullBackOff: verify image name/tag, imagePullSecret for private registries, and node-to-registry network.
- Pending: read the FailedScheduling event for insufficient resources, taints, affinity, or unbound PVC.
- OOMKilled (exit 137): raise the memory limit only after measuring real usage, and fix the underlying leak.
How to prepare so the answers stick
Memorizing definitions gets you through the first ten minutes; the interview turns when someone hands you a broken cluster or asks you to design one. Build muscle memory on the diagnostic loop until kubectl describe, kubectl get events --sort-by=.lastTimestamp, and kubectl logs --previous are reflexes. Practice deliberately breaking things in a throwaway cluster: ship a bad image tag, set a memory limit too low, apply a too-aggressive liveness probe, request more CPU than any node has, then walk yourself through finding and fixing each one out loud as you would in the interview.
prepme.io is built for exactly this loop. Paste the job description you are targeting and you get a free briefing that maps the role to three practice surfaces: real in-browser Kubernetes and Terraform labs where you debug live pods (the flagship), an architecture design round for the whiteboard portion, and a mock interview that grills your actual resume for the role. Each task is graded 0 to 100 with written feedback so you know exactly where you stand, and a free Company Coverage card researches the employer (recent news, funding, culture, and likely interview intel) so you can tailor your answers. Generating and viewing the briefing is free; you can try the demo before deciding to subscribe and practice the hands-on labs.
- Drill the diagnostic loop until describe/events/logs --previous are automatic.
- Break a sandbox cluster on purpose, then narrate the fix as if interviewing.
- Target practice to the actual JD instead of generic question dumps.
- Pair concept review with hands-on reps (labs), architecture design, and a mock interview.
Common interview questions & answers
What is the difference between a Deployment, a ReplicaSet, and a pod?
A pod is the smallest deployable unit, one or more co-located containers sharing a network namespace and storage. A ReplicaSet ensures a specified number of identical pod replicas are running at any time. A Deployment is a higher-level controller that manages ReplicaSets to give you declarative rolling updates, rollbacks, and scaling. In practice you create Deployments; on each update the Deployment creates a new ReplicaSet and scales the old one down gradually, which is what enables zero-downtime rollouts and kubectl rollout undo. A bare pod is a single point of failure: nothing reschedules it when its node dies, which is why production workloads always sit behind a controller. You can watch the handover live with kubectl rollout status deployment/web, and kubectl get rs shows the old ReplicaSet scaled to zero but retained for rollback. Interviewers ask this to check you understand the controller hierarchy rather than treating Kubernetes as a container runner.
How does a Service find the pods it routes to, and what are the main Service types?
A Service selects pods by label and load-balances across the ready endpoints behind a stable virtual IP and DNS name, so callers never depend on individual pod IPs that churn. The endpoint list is maintained automatically as pods pass or fail readiness. ClusterIP exposes the Service only inside the cluster, NodePort opens a static port on every node, and LoadBalancer asks the cloud provider for an external load balancer. Headless Services (clusterIP: None) skip the virtual IP and return pod IPs directly via DNS, which StatefulSets use for stable per-pod records. A useful debugging habit: kubectl get endpointslices (or kubectl describe service web) shows whether any pods actually back the Service — an empty endpoint list usually means a label-selector typo or every pod failing its readiness probe, and it is the first thing to check when a Service name resolves but connections are refused. Interviewers use this question to see whether you understand that a Service is label-driven routing, not a hand-configured proxy.
Explain liveness, readiness, and startup probes and when each matters.
A liveness probe detects a hung or deadlocked container and restarts it; failing liveness kills and recreates the container per the pod's restartPolicy. A readiness probe controls whether a pod receives traffic by adding or removing it from Service endpoints, without restarting it, which is what you want during warmup or temporary dependency loss. A startup probe protects slow-starting apps by holding off liveness and readiness checks until the app has booted, preventing premature restarts. A frequent production mistake is an aggressive liveness probe that restarts healthy-but-busy pods, turning a load spike into a CrashLoopBackOff. Concretely, a Java service that takes ninety seconds to boot needs a startup probe with a generous failureThreshold times periodSeconds budget; without one, a liveness probe checking every ten seconds kills it before it serves a request. Each probe type supports httpGet, tcpSocket, exec, and grpc checks, and kubectl describe pod shows which probe failed and why. Interviewers ask because conflating readiness with liveness causes real outages.
A pod is stuck in CrashLoopBackOff. Walk me through diagnosing it.
CrashLoopBackOff means the container starts, exits, and Kubernetes is backing off before restarting, so the status is a symptom not a cause. I run kubectl describe pod to read the events and last state, then kubectl logs <pod> --previous to see output from the crashed instance, since the current one may not have logged yet. The usual causes are a missing or malformed config or env var, a failed startup dependency, a non-zero exit from the app, or an over-aggressive liveness probe. I fix the root cause shown in the previous-instance logs rather than just restarting and hoping. The exit code in the last state narrows it fast: 1 is a generic application error, 137 means the process was killed with SIGKILL (most often the OOM killer), and 127 is a missing command or entrypoint typo. The backoff grows exponentially and caps at five minutes between attempts. Interviewers ask this to watch your diagnostic order under pressure, not to hear the definition.
What causes ImagePullBackOff, and how do you fix it?
ImagePullBackOff (preceded by ErrImagePull) means the kubelet cannot pull the container image. kubectl describe pod shows the exact error. Common causes are a wrong image name or tag, a private registry with no imagePullSecret referenced by the pod or its ServiceAccount, registry rate limiting, or the node having no network route to the registry. The fix follows the error: correct the tag, attach the right imagePullSecret, authenticate to the registry, or restore connectivity. I also confirm the image actually exists in the registry, since a typo in the tag is the most common culprit. The describe output is specific: manifest unknown means the tag does not exist, unauthorized points at credentials, and a timeout points at networking. For private registries I check the imagePullSecret with kubectl get secret and confirm the pod or ServiceAccount references it — an existing but unreferenced secret is a classic miss. Docker Hub's anonymous pull limits also make rate limiting a real cause on busy clusters.
A pod stays Pending and never schedules. What do you check?
Pending means the scheduler cannot place the pod, so I read kubectl describe pod for the FailedScheduling event, which names the failing predicate. The usual reasons are insufficient CPU or memory across all nodes relative to the pod's requests, an unsatisfiable nodeSelector or affinity rule, a taint with no matching toleration, or a PVC that cannot bind. A subtle case is a ReadWriteOnce volume already attached on another node, which blocks a second replica from scheduling there. I fix it by right-sizing requests, adding capacity, adjusting affinity or tolerations, or correcting the storage access mode. The event text is explicit, for example: 0/6 nodes are available: 3 Insufficient cpu, 3 node(s) had untolerated taint. To confirm the capacity math I compare the pod's requests against the Allocatable and Allocated resources sections of kubectl describe node — a node can look idle while its allocatable CPU is fully reserved by requests. Interviewers want to see you read the event first, not guess.
What does OOMKilled mean and how do you remediate it properly?
OOMKilled means the container exceeded its memory limit and the cgroup out-of-memory killer terminated it, which shows as last state OOMKilled with exit code 137 in kubectl describe pod. The wrong fix is to blindly raise the limit; the right approach is to measure actual memory use under realistic load, set the limit above the true working set with headroom, and align the request so the scheduler reserves enough and the pod gets a stable QoS class. If usage grows unbounded I treat it as a leak or an unbounded buffer or cache and fix the application, because a higher limit only delays the next kill. Exit code 137 is 128 plus signal 9, a SIGKILL. For measurement, kubectl top pod (backed by metrics-server) shows live usage, and a Prometheus history reveals whether growth is a slow leak or a spike. A classic edge case is a JVM whose maximum heap exceeds the container's limit: the process allocates past the cgroup ceiling and is killed.
How does RBAC work in Kubernetes, and what does least privilege look like?
RBAC grants permissions through Roles and ClusterRoles, which list allowed verbs on resources, bound to subjects by RoleBindings (namespace-scoped) and ClusterRoleBindings (cluster-wide). Every pod authenticates as a ServiceAccount, so workload permissions come from what is bound to that account. Least privilege means giving each workload a namespaced Role with only the verbs and resources it needs, never binding cluster-admin to application identities, and scoping per namespace so a compromised pod cannot reach other tenants. kubectl auth can-i is a useful check, but for cluster-scoped resources it can mislead, so confirm with a real API call rather than relying on can-i alone. RBAC is additive: there are no deny rules, so a subject's effective access is the union of everything bound to it, and an over-broad binding anywhere wins. A least-privilege example is a Role granting only get, list, and watch on configmaps in one namespace, bound to the app's ServiceAccount. A quick impersonation check is kubectl auth can-i list secrets --as=system:serviceaccount:prod:app, subject to the same caveat.
What is the difference between resource requests and limits, and why do both matter?
A request is the amount of CPU or memory the scheduler reserves for a container and uses to decide which node fits the pod; a limit is the runtime ceiling the container cannot exceed. CPU over the limit is throttled, while memory over the limit gets the container OOMKilled. If requests are too low you oversubscribe nodes and trigger evictions under pressure; if too high you waste capacity and leave pods Pending. The interview-grade answer is that requests and limits together define the pod's Quality of Service class (Guaranteed, Burstable, BestEffort), which determines eviction order when a node runs low on resources. Guaranteed means requests equal limits for every container; Burstable has requests below limits; BestEffort sets neither and is evicted first. A concrete example: a container requesting 500m CPU with a 1-CPU limit can burst under load but gets throttled at the cap, visible as elevated container_cpu_cfs_throttled_periods_total in Prometheus.
How do ConfigMaps and Secrets differ, and what are their security caveats?
Both inject configuration into pods as environment variables or mounted files, but ConfigMaps are for non-sensitive data and Secrets are for sensitive values. The key caveat is that stock Secrets are only base64-encoded, not encrypted, so anyone with API read access or etcd access can decode them unless you enable encryption at rest and lock down RBAC. Another gotcha is propagation: changes to a mounted ConfigMap or Secret eventually update the file, but env-var injections are fixed at pod start and never update a running pod, and most apps need an explicit reload to pick up file changes anyway. You can prove the base64 point in one line: kubectl get secret db-creds -o jsonpath='{.data.password}' | base64 -d prints the plaintext for anyone RBAC allows to read Secrets. Marking a ConfigMap or Secret immutable: true prevents accidental edits. In production many teams keep the source of truth in an external manager such as Vault or AWS Secrets Manager and sync values in via an operator.
What is an Ingress and why might one not work even though it is created?
An Ingress is an L7 routing object that maps hostnames and paths to backend Services, enabling host-based and path-based routing, TLS termination, and a single entry point for many Services. The critical point is that an Ingress object does nothing on its own; it requires an Ingress controller (ingress-nginx, Traefik, or a cloud controller) actually running in the cluster to watch Ingress resources and configure the proxy. If you create an Ingress and traffic does not route, first verify a controller is installed and healthy, then that the backend Service and its endpoints exist and that DNS points at the controller's external address. Many newer clusters use the Gateway API instead, which generalizes the same model. A subtler failure is the ingressClassName field: if it names a class no controller serves, or is omitted with no default IngressClass set, every controller ignores the object. An empty ADDRESS column in kubectl get ingress is the tell, and kubectl get ingressclass shows what is available.
How does cluster DNS resolve Service names across namespaces?
CoreDNS provides in-cluster DNS, giving every Service a record at service.namespace.svc.cluster.local. Within the same namespace you can call a Service by its short name, but to reach a Service in another namespace you must include the namespace, for example payments.prod.svc.cluster.local or at minimum payments.prod. A frequent bug is an app using a bare Service name and failing to reach a Service that lives in a different namespace. For StatefulSets, a headless Service gives each pod a stable DNS name like pod-0.service.namespace.svc.cluster.local, which is how clustered databases find their peers. The mechanism is the pod's /etc/resolv.conf: the kubelet injects search domains (namespace.svc.cluster.local, svc.cluster.local, cluster.local) plus ndots:5, which is how short names expand — and also why unqualified external lookups can generate several failed cluster queries first. To debug, exec into a pod and run nslookup payments.prod (or use a netshoot image when the app container has no DNS tools); if that resolves but the short name does not, you are looking at the cross-namespace case.
How would you design multi-tenant isolation so one team's workloads cannot affect another's?
I would isolate tenants by namespace and layer several controls, because a namespace alone is not a security boundary. RBAC scoped per namespace ensures each tenant's ServiceAccounts can only act within their own namespace; ResourceQuota and LimitRange cap CPU, memory, and object counts so a noisy tenant cannot starve the cluster; and NetworkPolicies are required to actually block cross-namespace traffic, which is allowed by default. For stronger isolation I would add Pod Security Standards, separate node pools via taints, and for hard guarantees consider per-tenant virtual clusters, since cluster-scoped resources like CRDs and ClusterRoles are shared and can collide across tenants. A starting point is a default-deny NetworkPolicy per tenant namespace (an empty podSelector, no ingress rules), then explicit allow policies for same-namespace traffic and each dependency. NetworkPolicies only work if the CNI enforces them; a CNI without policy support accepts the objects and silently enforces nothing. Interviewers ask because this separates engineers who have run shared clusters from those who have only read about namespaces.
Practice this for real, from your target job
Reading Kubernetes answers is not the same as fixing a CrashLoopBackOff while an interviewer watches. Paste a job description into prepme and we generate a briefing for that role: hands-on Kubernetes labs where you debug broken pods with kubectl, a graded architecture design round, and a mock interview built from your resume. Generating the briefing is free — unlike a static course, you practice on the stack the job names.
FAQ
How long does it take to prepare for a Kubernetes interview?+
If you already run k8s daily, a focused week of review plus hands-on debugging reps is usually enough. Coming in cold, plan three to six weeks: learn the core objects, then spend most of your time breaking and fixing a sandbox cluster, because interviewers test whether you can diagnose live problems, not just recite definitions.
Should I get the CKA or CKAD certification before interviewing?+
A certification signals baseline competence, and the CKA in particular forces hands-on kubectl fluency that transfers directly to interviews. It is not required and will not substitute for being able to reason about trade-offs and debug under pressure. Treat the cert's hands-on prep as the real value and the credential as a bonus.
Do Kubernetes interviews include live, hands-on troubleshooting?+
Increasingly yes, especially for DevOps, platform, and SRE roles. You may be given a broken cluster or a failing manifest and asked to find and fix the problem while explaining your reasoning. Practicing the describe, events, and logs --previous loop in a real cluster is the single highest-value preparation.
What is the most common reason candidates fail Kubernetes interviews?+
Stopping at the symptom. Saying a pod is in CrashLoopBackOff or Pending without a methodical next step signals you have read about Kubernetes but not operated it. Strong candidates name the exact command they would run next and explain what each line of output would tell them.
How do I prepare for the specific Kubernetes setup a company uses?+
Tailor your prep to the job description rather than studying generic question lists. On prepme.io you paste the JD and get a free briefing with hands-on labs, a design round, and a resume-based mock interview matched to that role's stack, plus a free Company Coverage card that surfaces likely interview intel about the employer.
Are managed Kubernetes services like EKS, GKE, and AKS tested differently?+
The core concepts are identical, but managed-service roles add questions about cloud integration: IAM and IRSA or EKS Pod Identity for pod identity on AWS, cloud load balancers and Ingress controllers, managed node groups and autoscaling, and the provider's storage classes. Know which responsibilities the managed control plane covers and which remain yours.
Related guides
- DevOps Interview Questions and AnswersDevOps interview questions with model answers across Linux, Docker, Kubernetes, Terraform, CI/CD, AWS, and SRE — plus how the loop works and a prep plan.
- Kubernetes Troubleshooting Interview QuestionsSenior Kubernetes troubleshooting interview questions with model answers: debug CrashLoopBackOff, Pending pods, probes, OOMKilled, RBAC, and stuck rollouts.
- Terraform Interview Questions and AnswersTerraform interview questions with model answers: HCL, state and locking, modules, workspaces, drift, import, providers, and plan/apply in CI — plus hands-on labs.
- SRE Interview Questions and AnswersSRE interview questions with model answers: SLIs, SLOs, error budgets, observability, incident response, and a worked production-debugging scenario.