Kubernetes is a common requirement in DevOps, platform engineering and SRE job descriptions across the US and UK, so interviewers rarely stop at “what is a pod?” They want to see how you reason about the control plane and what you would type when something breaks. These Kubernetes interview questions are written with that in mind.
The 29 questions below move from beginner to advanced and finish with real troubleshooting scenarios. Every answer is short enough to say out loud in an interview, and the details are checked against the official Kubernetes documentation, including recent changes such as Gateway API, native sidecar containers and in-place Pod resize. If you would rather prepare with a trainer and a real cluster, our live Kubernetes training covers the same ground with hands-on labs.
Key takeaways
- Know the difference between Deployments, StatefulSets, DaemonSets and Jobs, and when to pick each.
- Requests, limits, probes and QoS classes come up in almost every mid-level interview.
- Be current: Ingress NGINX is retired, Gateway API is the recommended path, sidecars and in-place resize are stable.
- For scenario questions, talk through
kubectl describe, events and logs before guessing at a fix.
Beginner Kubernetes interview questions
1. What is Kubernetes, and what problem does it solve?
Kubernetes is an open source platform for running containerized applications across a cluster of machines. You describe the state you want (for example, “three replicas of this image, reachable on port 80”) and Kubernetes keeps working to make the cluster match it. It handles scheduling, restarts, scaling, service discovery and rolling updates, so teams stop managing individual servers by hand.
2. What are the main components of a Kubernetes cluster?
The control plane runs kube-apiserver (the HTTP API every tool talks to), etcd (the key value store holding all cluster data), kube-scheduler (assigns new Pods to nodes) and kube-controller-manager (runs the controllers that reconcile state). A cloud-controller-manager is optional and links the cluster to a cloud provider. Each worker node runs the kubelet, a container runtime and, in most clusters, kube-proxy for Service networking.
3. What is a Pod, and why not just run containers directly?
A Pod is the smallest deployable unit: one or more containers that share a network namespace (one IP address) and can share volumes, so tightly coupled helpers can live next to the main app. Pods are disposable, so you rarely create them directly; a controller such as a Deployment creates and replaces them. A Deployment manages ReplicaSets, which keep a set number of identical Pods running, and adds rolling updates and rollback.
4. What is a Service, and what types are there?
A Service gives a stable virtual IP and DNS name to a changing set of Pods selected by labels. The types are:
| Type | What it does |
|---|---|
| ClusterIP (default) | Reachable only inside the cluster. |
| NodePort | Opens a static port on every node, built on top of a ClusterIP. |
| LoadBalancer | Asks the cloud provider (or another integration) for an external load balancer. |
| ExternalName | Maps the Service to an external DNS name, with no selector. |
Setting clusterIP: None creates a headless Service, which returns Pod IPs directly and is common with StatefulSets.
5. How do labels and selectors work?
Labels are key value pairs attached to objects, such as app: web. Selectors query those labels. Services, Deployments and NetworkPolicies all find their Pods through selectors, which is why a typo in a label is one of the most common causes of “my Service has no endpoints.”
6. What is the difference between a ConfigMap and a Secret?
Both inject configuration into Pods as environment variables or files. Secrets are meant for sensitive values, but the official docs warn that they are stored unencrypted in etcd by default, and base64 is an encoding, not encryption. Production clusters should enable encryption at rest, restrict access with RBAC, or use an external secrets manager.
7. Name the kubectl commands you use most.
kubectl get pods -n shop -o wide # list Pods with node and IP
kubectl describe pod web-7d9f -n shop # events, probes, scheduling details
kubectl logs web-7d9f -c app --previous # logs from the last crashed container
kubectl apply -f deployment.yaml # create or update from a manifest
kubectl rollout status deployment/web # watch a rollout
kubectl rollout undo deployment/web # roll back to the previous revision
kubectl exec -it web-7d9f -- sh # open a shell in a running container Intermediate Kubernetes interview questions
8. When would you use a StatefulSet instead of a Deployment?
Use a StatefulSet when each replica needs a stable, unique identity and its own persistent storage, for example a database cluster or Kafka brokers. Pods get predictable names (db-0, db-1), start and stop in order, and keep their PersistentVolumeClaims across restarts. Stateless web apps belong in Deployments.
9. What is a DaemonSet?
A DaemonSet runs one copy of a Pod on every node (or on a selected group of nodes). Typical uses are log collectors, monitoring agents and CNI or storage plugins. New nodes get the Pod automatically.
10. Explain resource requests and limits.
A request is what the scheduler reserves for a container when placing it on a node. A limit is the ceiling at runtime. A container that goes over its CPU limit is throttled, while one that goes over its memory limit can be killed with an OOMKilled status. Setting sensible requests is one of the biggest factors in good scheduling and cost control.
resources:
requests:
cpu: "250m"
memory: "256Mi"
limits:
memory: "512Mi" 11. What are QoS classes?
Kubernetes places every Pod in one of three Quality of Service classes based on its requests and limits: Guaranteed (requests equal limits for CPU and memory in every container), Burstable (some requests or limits set) and BestEffort (none set). Under node pressure, BestEffort Pods are evicted first, then Burstable, and Guaranteed last.
12. What is the difference between liveness, readiness and startup probes?
- Liveness: decides when to restart a container, for example one stuck in a deadlock.
- Readiness: decides when a container may receive traffic; a failing Pod is removed from Service endpoints but not restarted.
- Startup: protects slow starting apps; liveness and readiness checks wait until it succeeds.
A classic mistake is pointing liveness at a dependency such as the database, which turns a database blip into a restart storm.
13. How does a rolling update work?
The Deployment creates a new ReplicaSet and shifts Pods over gradually. maxSurge controls how many extra Pods may exist during the update and maxUnavailable controls how many may be down; both default to 25%. Readiness probes decide when a new Pod counts as available, which is why missing probes make rollouts look healthy when they are not.
14. What is the difference between Ingress and Gateway API?
Ingress is the original API for HTTP routing into a cluster and needs an Ingress controller. Gateway API is the newer, role oriented replacement. Its stable kinds are GatewayClass, Gateway, HTTPRoute and GRPCRoute, and it supports header matching and traffic weighting without vendor specific annotations. Worth mentioning in an interview: the Kubernetes project retired the popular Ingress NGINX controller, with best effort maintenance ending in March 2026, and recommends moving to Gateway API or another controller.
15. How do PersistentVolumes, PersistentVolumeClaims and StorageClasses fit together?
A PersistentVolumeClaim (PVC) is a request for storage made by a workload. A PersistentVolume (PV) is the actual piece of storage. A StorageClass tells the cluster how to create PVs on demand, for example which cloud disk type to use, so a PVC can be satisfied through dynamic provisioning without an admin creating volumes by hand.
16. How does Kubernetes RBAC work?
A Role grants verbs (get, list, create, delete) on resources within one namespace; a ClusterRole does the same cluster wide. A RoleBinding or ClusterRoleBinding attaches those permissions to users, groups or ServiceAccounts. Follow least privilege and avoid binding cluster-admin to application ServiceAccounts.
17. What are taints, tolerations and node affinity?
A taint on a node repels Pods; only Pods with a matching toleration can schedule there, which is how you reserve GPU nodes. Node affinity works the other way: it attracts Pods to nodes with certain labels. Teams often combine both to keep special workloads on special hardware and everything else away from it.
18. How does the Horizontal Pod Autoscaler work?
The HPA periodically compares observed metrics, such as average CPU utilization or custom metrics, with a target and changes the replica count of a Deployment or StatefulSet. It cannot scale objects that have no replica count, such as a DaemonSet. It depends on a metrics source like metrics-server, and the Pods need CPU requests for percentage targets to make sense.
Advanced Kubernetes interview questions
19. Walk through what happens when you run kubectl apply on a Deployment.
kubectl sends the manifest to the API server, which authenticates the request, checks RBAC, runs admission controllers and stores the object in etcd. The Deployment controller notices the change and creates or updates a ReplicaSet. The ReplicaSet controller creates Pod objects, the scheduler picks a node for each, and the kubelet on that node asks the container runtime to pull images and start containers. Components coordinate by watching the API server, not by calling each other.
20. What are native sidecar containers?
Since Kubernetes v1.33, sidecars are a stable feature. You declare a sidecar as an init container with restartPolicy: Always. It starts before the app containers, keeps running alongside them, and shuts down after them, which fixes old problems such as a service mesh proxy exiting before the app finished its work, or Jobs never completing because a sidecar kept running.
spec:
initContainers:
- name: log-shipper
image: example/log-shipper:1.0
restartPolicy: Always
containers:
- name: app
image: example/app:2.3 21. What is in-place Pod resize?
In-place Pod resize, stable since Kubernetes 1.35, makes CPU and memory requests and limits mutable on a running Pod. You request a change through the Pod’s resize subresource, and often the container does not need to restart. It is a building block for less disruptive vertical autoscaling, especially for stateful or latency sensitive workloads.
22. How do you enforce Pod security today?
Use Pod Security Admission, which has been stable since v1.25 and enforces the Pod Security Standards at namespace level. The three levels are privileged, baseline and restricted, and each namespace can use enforce, audit or warn modes. PodSecurityPolicy no longer exists in current releases, so an answer that relies on it signals outdated knowledge.
kubectl label namespace payments \
pod-security.kubernetes.io/enforce=restricted \
pod-security.kubernetes.io/warn=restricted 23. How do NetworkPolicies work?
By default Pods accept traffic from anywhere and can send traffic anywhere. Once a NetworkPolicy selects a Pod for ingress or egress, only the traffic that some policy allows gets through in that direction. Policies only work if the cluster’s network plugin supports them, so a policy applied on a plugin without enforcement silently does nothing.
24. What is a PodDisruptionBudget?
A PDB limits how many replicas of an application can be down at the same time because of voluntary disruptions, such as a node drain during an upgrade. For a three node quorum system you might set minAvailable: 2. PDBs do not protect against involuntary disruptions such as hardware failure.
25. Does Kubernetes still support Docker?
Kubernetes removed dockershim in v1.24, so the kubelet no longer talks to Docker Engine directly. Clusters use CRI compatible runtimes such as containerd or CRI-O. Images built with Docker still run fine because they follow the OCI image format; only the runtime integration changed.
Scenario based Kubernetes interview questions
26. A Pod is stuck in Pending. How do you investigate?
Run kubectl describe pod and read the Events. Common causes are insufficient CPU or memory on every node (requests too high), taints with no matching toleration, node affinity rules no node satisfies, or a PersistentVolumeClaim that cannot bind. Fix the cause rather than deleting and recreating the Pod.
27. A Pod is in CrashLoopBackOff. What do you do?
Check kubectl logs --previous for the last crash and kubectl describe pod for the exit code and reason. OOMKilled points to memory limits, an exit right after start points to bad config or a missing Secret, and repeated restarts after a delay often mean a liveness probe that is too aggressive. If the image has no shell, kubectl debug can attach a temporary debugging container.
28. A Service returns connection errors but the Pods look healthy. Where do you look?
Run kubectl get endpointslices -l kubernetes.io/service-name=web. Empty results usually mean the Service selector does not match the Pod labels, or readiness probes are failing. Then confirm targetPort matches the port the container listens on, and check whether a NetworkPolicy blocks the caller.
29. You need to upgrade worker nodes with no downtime. What is your plan?
Make sure critical apps run at least two replicas spread across nodes and have PodDisruptionBudgets. Then upgrade one node or node pool at a time: kubectl cordon to stop new scheduling, kubectl drain --ignore-daemonsets to evict Pods while respecting PDBs, upgrade, and uncordon. Watch readiness and error rates before moving on, and keep within the version skew policy between the control plane and kubelets.
How to prepare for a Kubernetes interview
Build a small cluster with kind, minikube or a managed service such as EKS, AKS or GKE, then break it on purpose: wrong labels, missing Secrets, impossible resource requests. Explaining what you saw is what separates candidates. If you know Terraform, provision the cluster as code with our Terraform tutorial for beginners, and review the Puppet interview questions for the configuration management side. For where automation is heading, read applying machine learning to DevOps.
CNCF certifications also help. The CKA, CKAD and CKS exams are performance based, so you solve tasks on the command line rather than answer multiple choice questions; KCNA and KCSA are associate level options. Check the current curriculum on the CNCF site before booking, then update your CV with our free resume builder. You can also browse our IT training courses for related DevOps and cloud skills.
Learn Kubernetes with live, instructor-led training
Our live online Kubernetes course covers architecture, Pods, Deployments, Services, storage, networking, security, Helm and troubleshooting. You practice in hands-on labs and get guidance for the CKA and CKAD exams.
Frequently asked questions
How do I prepare for a Kubernetes interview?
Combine theory with practice. Learn the core objects and control plane flow, then run a local cluster and deliberately troubleshoot failures such as Pending Pods and CrashLoopBackOff. Interviewers trust candidates who can explain what they saw and why.
What Kubernetes questions are asked for DevOps engineers?
Expect questions on Deployments and rollouts, Services and Gateway API, requests and limits, probes, RBAC, Helm, autoscaling and troubleshooting scenarios. Senior roles add cluster upgrades, security policies, multi tenancy and cost control. You can browse more interview questions for related tools.
Is Kubernetes hard to learn?
The basics are manageable if you already know Linux and containers. Networking, storage and security take longer because they depend on plugins and cloud integrations, so learn in small hands-on steps.
Do I need to know Docker before learning Kubernetes?
You need container basics such as images, registries and ports. Docker is a common way to learn them, even though Kubernetes runs containers through CRI runtimes like containerd.
Sources
- Kubernetes documentation: Kubernetes components, Services, StatefulSets, Pod QoS classes, probes, Secrets, Gateway API, NetworkPolicies, disruptions, Horizontal Pod Autoscaling, Pod Security Admission and sidecar containers (kubernetes.io/docs).
- Kubernetes release history (kubernetes.io/releases).
- Kubernetes blog: “Ingress NGINX Retirement: What You Need to Know” (November 2025), “Kubernetes 1.35: In-Place Pod Resize Graduates to Stable” (December 2025) and the dockershim removal FAQ.
- CNCF: Cloud native certifications (cncf.io/training/certification).