Kubernetes Interview Questions (with real STAR answers)

The Kubernetes interview questions that come up most, from junior to senior - pods, Deployments, Services, probes, resources, autoscaling, security, and troubleshooting. Short model answers for the technical questions, and STAR answers for the "tell me about a time" questions, built from real cluster work you can do yourself.

Get started - freeLive cloud workspace in your browser · nothing to install

Kubernetes interviews mix technical questions, troubleshooting scenarios with kubectl, and behavioral questions. This page covers the questions that come up most, from junior to senior: behavioral questions with STAR answers built from real cluster work you can do yourself, then technical and scenario questions with short model answers.

Kubernetes behavioral interview questions (STAR answers)

Tell me about a time you debugged a failing pod.

Situation: A Deployment was stuck in CrashLoopBackOff and the app never came up.
Task: I had to find why the container kept dying and get the pod healthy.
Action: I ran kubectl describe pod for the events and exit code and kubectl logs --previous for the crashed container's output, found the startup error, and corrected the manifest.
Result: The pod became stable and passed its probes, and I wrote down the misconfiguration so it would not happen again.

Go earn this story: Fix a Kubernetes CrashLoopBackOff →

Tell me about a time you scaled a service.

Situation: A service became slow and returned errors during traffic spikes because it ran a fixed number of replicas.
Task: I needed it to scale with load automatically instead of someone scaling it by hand.
Action: I set CPU requests on the containers and created a HorizontalPodAutoscaler with sensible minimum and maximum replicas and a CPU target.
Result: The service kept latency stable during spikes and scaled back down when traffic dropped, with no manual work.

Go earn this story: Configure a Kubernetes HPA for Autoscaling →

Tell me about a time you secured a cluster.

Situation: Pods in a namespace could talk to anything, with no network restrictions at all.
Task: I had to enforce least-privilege networking without breaking the app's real traffic.
Action: I applied a default-deny NetworkPolicy, then added explicit allow rules only for the connections the app needed, including DNS.
Result: Pods could no longer reach services they had no reason to talk to, and the app kept working.

Go earn this story: Lock Down a Namespace With a NetworkPolicy →

Tell me about a time traffic was not reaching your app.

Situation: The pods were running and healthy, but requests to the Service timed out.
Task: I had to find where the path from the Service to the pods was broken.
Action: I ran kubectl get endpoints and saw the Service had no endpoints. Its selector did not match the pod labels, so I corrected the selector and checked that the targetPort matched the container port.
Result: The endpoints filled in and traffic reached the pods. Since then, checking endpoints is my first step when a Service does not respond.

Go earn this story: Heal a Kubernetes Service With No Endpoints →

Tell me about a time you released a new version safely.

Situation: We needed to release a new image of a busy service without dropping requests.
Task: I had to roll it out gradually and be able to go back quickly.
Action: I used a rolling update with maxUnavailable set to 0 and a readiness probe, so old pods were removed only after new ones were ready. I watched it with kubectl rollout status.
Result: The release finished with no failed requests, and kubectl rollout undo was ready if the new version had problems.

Go earn this story: Release a New Image With a Rolling Update →

Tell me about a time you set resource requests and limits.

Situation: Pods were being OOMKilled during busy periods, and some nodes were overloaded while others were idle.
Task: I needed the scheduler to place pods correctly and stop the out-of-memory kills.
Action: I measured real usage with kubectl top and our metrics, then set memory and CPU requests near normal usage and a memory limit with room for peaks.
Result: The OOMKills stopped, pods were spread more evenly across nodes, and capacity planning became easier.

Go earn this story: Set CPU and Memory Requests and Limits →

Kubernetes technical and scenario interview questions

What is the difference between a Pod, a ReplicaSet, and a Deployment?

A Pod is one or more containers that share a network and storage and are scheduled together. A ReplicaSet keeps a set number of identical pods running. A Deployment manages ReplicaSets and adds rolling updates and rollbacks. You normally create Deployments, not bare pods.

What are the Kubernetes Service types?

ClusterIP (the default) gives a stable internal IP and DNS name inside the cluster. NodePort opens the same port on every node. LoadBalancer asks the cloud provider for an external load balancer. For HTTP routing by host or path, use an Ingress with an Ingress controller in front of ClusterIP Services.

What is the difference between liveness, readiness, and startup probes?

A liveness probe failing makes the kubelet restart the container. A readiness probe failing removes the pod from Service endpoints, so it gets no traffic, but does not restart it. A startup probe gives slow-starting apps time to start before the liveness probe begins.

What is the difference between resource requests and limits?

Requests are what the scheduler reserves for the container when placing the pod. Limits are the maximum it may use. A container that uses more memory than its limit is OOMKilled; one that hits its CPU limit is throttled, not killed.

What is the difference between a ConfigMap and a Secret?

Both inject configuration as environment variables or files. Secrets are meant for sensitive data, but by default they are only base64-encoded, not encrypted. Protect them with RBAC, encryption at rest, and often an external secret manager such as Vault or AWS Secrets Manager.

When would you use a Deployment, a StatefulSet, or a DaemonSet?

Use a Deployment for stateless apps where any pod can replace another. Use a StatefulSet for apps that need a stable network identity and their own persistent storage, such as databases. Use a DaemonSet to run one pod on every node, for example log collectors or monitoring agents.

How does a rolling update work?

The Deployment creates a new ReplicaSet and moves pods over step by step. maxSurge sets how many extra pods can exist during the update, and maxUnavailable sets how many can be missing. Readiness probes decide when a new pod gets traffic. Use kubectl rollout status to watch and kubectl rollout undo to go back.

How does the Horizontal Pod Autoscaler work?

The HPA reads metrics, usually from metrics-server, and changes a Deployment's replica count to keep a target such as 70% CPU. CPU and memory targets are measured against requests, so the containers must have requests set. It can also scale on custom metrics through a metrics adapter.

What are the main parts of the Kubernetes control plane?

The kube-apiserver is the front door for all changes. etcd stores the cluster state. The scheduler picks a node for each new pod. The controller manager runs the loops that keep the real state equal to the desired state. On each node, the kubelet runs pods and kube-proxy handles Service networking.

What is a NetworkPolicy?

A rule that controls which traffic can reach or leave pods, selected by labels and namespaces. Without any policy, all pod traffic is allowed. It only works if the network plugin (CNI) supports it, such as Calico or Cilium. A common pattern is default-deny plus explicit allows.

What is a PodDisruptionBudget?

A PDB sets how many pods of an app must stay available (minAvailable) or may be down (maxUnavailable) during voluntary disruptions such as node drains and cluster upgrades. It does not protect against crashes or node failures.

What is the difference between taints and tolerations and node affinity?

Taints on a node keep pods away unless the pod has a matching toleration - the node pushes pods away. nodeSelector and node affinity make a pod prefer or require certain nodes - the pod pulls itself toward nodes. To give a workload dedicated nodes, you usually use both.

What is RBAC in Kubernetes?

Role-based access control. A Role grants permissions on resources in one namespace, and a ClusterRole grants them across the cluster. A RoleBinding or ClusterRoleBinding gives those permissions to users, groups, or ServiceAccounts. Follow least privilege and avoid giving cluster-admin to apps.

Scenario: a pod is stuck in Pending. How do you troubleshoot?

Run kubectl describe pod and read the Events. Common causes are not enough CPU or memory on any node for the requests, a taint with no matching toleration, a nodeSelector or affinity no node matches, or a PersistentVolumeClaim that is not bound. Fix the cause or add capacity.

Scenario: a pod shows ImagePullBackOff. What do you check?

Run kubectl describe pod for the exact error. Check the image name and tag for typos, that the tag exists in the registry, that the cluster has credentials for a private registry (imagePullSecrets or node-level config), and that nodes can reach the registry.

What questions are asked in a Kubernetes interview?

Expect behavioral questions (tell me about a time you...), technical questions on workloads, Services, probes, resources, scaling, and security, and troubleshooting scenarios such as CrashLoopBackOff or a Pending pod. Many companies also give a hands-on task with kubectl. The questions on this page cover all of these.

How do you answer behavioral interview questions?

Use STAR: Situation, Task, Action, Result. Keep it concrete - a specific incident, what you owned, what you did, and the result. The answers above are all structured this way.

More for Kubernetes engineers

Kubernetes projectsKubernetes roadmapResume projectsCareer guide

Do real production work, free. Live cloud workspaces in your browser - every project you complete lands on your portfolio.

Get started - free
Get started - free