Kubernetes Interview Questions: 43 Answers for New Grads (2026)
Kubernetes interview questions in 2026 split between book-knowledge (what's a Pod, a Deployment, a Service) and incident-grade scenarios (your pod is CrashLoopBackOff'ing, what do you check first). The book questions you can grind. The scenarios separate the candidate who watched a YouTube series from the engineer who's actually shipped to a cluster. This guide covers 40+ questions across architecture, networking, troubleshooting, security, and the kubectl commands every new grad fumbles, plus a 3-week prep plan that doesn't ask you to lie about production experience you don't have.
By Sam K., Founder, InterviewChamp.AI · Last updated
32 min readTL;DR: Kubernetes interviews check two things: whether you know the vocabulary (Pod, Deployment, Service, ConfigMap) and whether you have run a cluster and fixed one when it broke. Below are 43 numbered questions in six buckets (architecture, networking, troubleshooting, security and RBAC, kubectl, design scenarios), plus three "what changed lately" questions, each with an answer outline. Spend most of your prep on troubleshooting, because freezing on "your pod is in CrashLoopBackOff" is the fastest way to fail the round.
Kubernetes interview questions are the questions DevOps, SRE, platform and cloud teams use to find out if you can explain how a cluster is put together and debug it under pressure. If you only have one evening, learn the troubleshooting answers (Q19 to Q28) and the kubectl answers (Q34 to Q38) first. Those are the ones you can't bluff.
What kubernetes interview questions test in 2026#
Two skills get tested. The first is vocabulary: can you say what a Pod, a Deployment and a Service are without stumbling? The second is hands-on time. When the interviewer says your pod is CrashLoopBackOff'ing, what's the first command you type? You can pick up the vocabulary from the docs in a week, but the hands-on half is where most CS new grads fall apart.
A familiar story goes like this. Someone finishes a Docker class, binges a YouTube series, works through the official tutorial and adds "Kubernetes" to their resume. Then a DevOps interviewer asks what they'd do about a pod stuck in Pending. Thirty seconds of silence. "I'd, uh, check the logs?" The docs teach you the nouns. The interview tests the verbs.
Here is a rough estimate of how the Kubernetes questions split for new-grad DevOps, junior SRE, junior platform engineering, and SWE roles with a K8s tag:
- 35% architecture questions (Pod, Deployment, Service, ConfigMap, Secret, namespaces)
- 25% troubleshooting scenarios (your pod is X, walk me through it)
- 15% networking questions (CNI, Services, NetworkPolicy, DNS)
- 10% security and RBAC questions
- 10% kubectl command fluency
- 5% adjacent topics (Helm, Docker, CI/CD integration, operators)
That 25% troubleshooting slice decides far more outcomes than its size suggests. Fumble a NetworkPolicy question and you can still pass. Freeze on "your pod is in CrashLoopBackOff" and you honestly won't.
The 5 buckets of kubernetes interview questions#
This list follows five buckets that match what real interviews ask about: architecture (the nouns), networking (the wires), troubleshooting (the verbs), security and RBAC (the rules) and kubectl (the muscle memory). A sixth bucket of design scenarios sits on top, since that format is the one most likely to decide your round.
Three terms come up in nearly every question, so pin them down first.
- Kubernetes is an open-source container orchestrator. It schedules, scales, heals and networks containerized workloads across a fleet of machines.
- A Pod is the smallest deployable unit Kubernetes manages: one or more containers that share an IP and storage on a single node.
- kubectl is the command-line client you use to talk to the cluster's API. Being fluent with it is what separates the candidate who has read about Kubernetes from the one who has used it.
Get those three straight and the rest of the vocabulary hangs off them.
Five kinds of roles ask these questions at the new-grad level:
- DevOps engineer: the widest coverage of all.
- Junior SRE: heavier on troubleshooting and observability.
- Junior platform engineer: heaviest on architecture and YAML.
- SWE with a K8s tag: the lightest depth, mostly about deployments.
- Junior cloud engineer: middle depth, flavored by EKS, GKE or AKS.
Applying to a mix of these? Prep to DevOps depth, which covers the other four.
How to use this list#
Skim the questions you already know and drill the ones you don't. Every answer here is an outline, not a script, so put it in your own words before you say it out loud.
If Kubernetes is new to you, work through the buckets in order. Architecture first, because every later bucket assumes that vocabulary. Then networking, then troubleshooting, which deserves the most hours. Security, kubectl and the design scenarios come last. If you already run a cluster at school or work, jump straight to troubleshooting and the scenarios and use the architecture bucket as a quick self-check.
Kubernetes architecture interview questions (10 Q)#
Everything else builds on this bucket. If you can't give a one-sentence definition of a Pod, a Deployment, a Service and a ConfigMap, start here and don't move on until you can.
What is a Pod?
Show sample answerHide answerSay yours out loud first, then check.
It's the smallest deployable unit in Kubernetes. A Pod holds one or more containers that share a network identity (same IP, same port space) and storage (shared volumes), and they all run together on one node. Most Pods run a single container. You see more than one when a sidecar rides along with the main app, like a logging agent, a service mesh proxy or a config reloader. Since v1.33, native sidecar containers are stable; the "how do sidecars work now" question further down covers how they behave.
What is a Deployment?
Show sample answerHide answerSay yours out loud first, then check.
A Deployment is a higher-level controller that manages a group of identical Pods through a ReplicaSet. It does three jobs: it keeps the replica count where you asked for it, it rolls out a new version when the Pod template changes, and it lets you roll back when the new version goes wrong. In production you almost never create bare Pods. You create a Deployment, the Deployment creates a ReplicaSet, and the ReplicaSet creates the Pods. That chain matters because kubectl rollout undo works on the Deployment, not on the Pods.
What's a ReplicaSet and why does it exist?
Show sample answerHide answerSay yours out loud first, then check.
A ReplicaSet keeps a steady number of replica Pods running at all times. Deployments lean on ReplicaSets to do rollouts: during a rolling update the Deployment creates a new ReplicaSet, scales it up and scales the old one down. You'll rarely touch a ReplicaSet directly. What the interviewer wants is for you to know the chain (Deployment to ReplicaSet to Pod), so kubectl get rs output makes sense to you.
What's a StatefulSet and when would you use one?
Show sample answerHide answerSay yours out loud first, then check.
A StatefulSet is the workload type for apps that need a stable network identity, ordered startup and shutdown, and persistent storage per pod. The Pods get predictable names (web-0, web-1, web-2), and each one gets its own PersistentVolumeClaim that survives rescheduling. Reach for it with databases (Postgres, MongoDB), distributed systems that elect a leader (Kafka, etcd, Cassandra), and anything where pod-1 has to stay pod-1 with the same hostname and the same disk. Stateless workloads go in a Deployment. The test is stable identity plus persistent storage, not just "it has state."
What's a DaemonSet and when would you use one?
Show sample answerHide answerSay yours out loud first, then check.
A DaemonSet makes sure one Pod runs on every node, or on every node that matches a selector. It's for per-node infrastructure: log collectors, metrics agents, network plugins, storage drivers. A new node gets its pod automatically, and a node that leaves takes its pod with it.
What's a Job and a CronJob?
Show sample answerHide answerSay yours out loud first, then check.
A Job runs a Pod until it finishes, either once or N times in parallel. Good fits are migrations, backups and one-shot data processing. A CronJob is a Job on a schedule, the cluster version of cron. Its spec holds a schedule in standard cron syntax plus a Job template. The trap new grads fall into is leaving out concurrencyPolicy and the history limits, and then finding zombie jobs piled up months later.
What's a Service and what types are there?
Show sample answerHide answerSay yours out loud first, then check.
A Service gives a shifting set of Pod IPs one stable virtual IP and DNS name. Pods come and go as they get rescheduled or scaled, but the Service IP stays put. There are three main types:
- ClusterIP is the default. It's internal only and handles service-to-service traffic inside the cluster.
- NodePort opens the service on a fixed port on every node's IP, which is handy in development or on bare metal.
- LoadBalancer provisions an external cloud load balancer. It's the production way to put HTTP in front of the internet.
There's also ExternalName, a CNAME alias to an outside DNS name, used to route to services that live outside the cluster.
What's an Ingress and how is it different from a LoadBalancer Service?
Show sample answerHide answerSay yours out loud first, then check.
An Ingress is a higher-level routing rule that sends many hostnames or paths through one entry point. A LoadBalancer Service gets one cloud load balancer per service, so 50 services means 50 load balancers, and that gets expensive. With Ingress you run a single ingress controller (traefik, haproxy, or your cloud provider's own) behind one LoadBalancer, and the controller sends each request to the right backend Service by hostname or path. The Ingress resource describes the rules, and the Ingress controller carries them out. Production clusters almost always use Ingress, or its successor Gateway API, for HTTP traffic. Worth mentioning: the popular Ingress NGINX controller stopped getting releases and security fixes in March 2026, and the Kubernetes project points users to Gateway API instead.
What's a ConfigMap and how is it different from a Secret?
Show sample answerHide answerSay yours out loud first, then check.
Both are key-value stores a pod can mount as environment variables or as files. ConfigMaps carry non-sensitive settings like feature flags, URLs, log levels and app config. Secrets carry the sensitive stuff: API keys, database passwords, TLS certificates. Here's the part the interviewer is after. By default a Secret is only base64-encoded, and base64 is encoding, not encryption, so anyone with read access to the cluster can decode it. Production clusters turn on encryption at rest for Secrets in etcd, and most add an external secret manager (sealed-secrets, Vault, cloud KMS) for the most sensitive material. New grads who assume Secrets are safe by default get caught on exactly this.
What's a namespace and when would you use multiple?
Show sample answerHide answerSay yours out loud first, then check.
A namespace is a logical partition inside a cluster. It scopes names, resource quotas, RBAC rules and network policies, so a Service called "web" can live in both a dev namespace and a prod namespace. Use namespaces to split up environments, teams or applications. The usual new-grad slip is dumping everything into the default namespace, which makes cleanup, RBAC and resource limits painful later on.
Kubernetes networking interview questions (8 Q)#
Networking questions ask how traffic gets to a Pod: Services and their types, DNS, kube-proxy, NetworkPolicy and Ingress. The answer that scores well follows one request hop by hop. This is where a lot of candidates get stuck, because the layers stack deep (CNI, Services, Endpoints, kube-proxy, DNS, Ingress) and most of it stays hidden until you run kubectl get endpoints and read the describe output carefully. Drill all eight.
How does pod-to-pod networking work in kubernetes?
Show sample answerHide answerSay yours out loud first, then check.
Three rules cover it. Every pod gets its own IP on a flat cluster network, with no NAT. Pods on the same node and pods on different nodes talk to each other the same way. And the Service layer puts stable virtual IPs in front of the pod IPs that keep changing. The actual plumbing comes from the CNI plugin (Calico, Cilium, Flannel), which is installed when the cluster is bootstrapped.
What's a CNI plugin?
Show sample answerHide answerSay yours out loud first, then check.
CNI stands for Container Network Interface. It's the plugin model Kubernetes uses to hand pod networking off to a third-party implementation. The plugin assigns pod IPs, sets up routes between nodes, and enforces NetworkPolicy if it supports that. The common choices in 2026:
- Calico: widely used, strong NetworkPolicy support.
- Cilium: eBPF-based, and the fastest growing of the three in 2025.
- Flannel: simple, and a common first choice on kubeadm clusters.
The point to land in the interview is that CNI sits outside Kubernetes core, and which one you pick changes what you get for NetworkPolicy and observability.
How does a Service route traffic to Pods?
Show sample answerHide answerSay yours out loud first, then check.
The Service has a selector that matches Pod labels. The Service controller keeps an Endpoints (or EndpointSlice) object that lists the IPs and ports of the matching Pods. kube-proxy runs on every node, watches those Endpoints, and programs iptables rules (or nftables rules on newer clusters; IPVS mode is deprecated) that send traffic for the Service IP and port to a randomly picked Pod IP. When a Pod dies or moves, the Endpoints object updates, kube-proxy rewrites its rules, and traffic shifts over. New grads often picture a Service as a load balancer in the cloud sense. It isn't. It's an iptables (or nftables) routing layer sitting on every node.
What is kube-proxy?
Show sample answerHide answerSay yours out loud first, then check.
kube-proxy is a network proxy that runs on every node and programs the iptables rules (or nftables rules on newer clusters; IPVS mode is deprecated) behind the Service abstraction. It watches the Kubernetes API for changes to Services and Endpoints and updates the routing to match. You'll usually find it running as a DaemonSet in kube-system.
How does DNS work in kubernetes?
Show sample answerHide answerSay yours out loud first, then check.
Every Service gets a DNS record automatically, in the form service-name.namespace.svc.cluster.local. Each pod gets a resolv.conf that points at the cluster DNS service, which is CoreDNS on modern clusters. When a pod looks up "web", the search path in resolv.conf expands it to "web.current-namespace.svc.cluster.local". DNS failures (a CoreDNS pod that's down, a NetworkPolicy that blocks DNS) are among the most common cluster-wide problems in production, which is exactly why this question keeps coming up.
What's a NetworkPolicy?
Show sample answerHide answerSay yours out loud first, then check.
It's a Kubernetes resource that limits which pods can talk to which other pods at the network layer. Out of the box, Kubernetes networking is wide open and every pod can reach every other pod. A NetworkPolicy lets you write a rule such as "pods in the frontend namespace may reach pods in the backend namespace on port 8080, and nothing else." The catch is that your CNI plugin has to support NetworkPolicy: Calico and Cilium do, Flannel doesn't out of the box. The interview signal is knowing NetworkPolicy is opt-in and depends on the CNI, unlike Services, which are built in.
What's the difference between Ingress and a LoadBalancer Service?
Show sample answerHide answerSay yours out loud first, then check.
This one overlaps with Q8, so answer it from the cost angle. A LoadBalancer Service means one cloud load balancer per service, which adds up fast: 50 microservices behind LoadBalancer Services cost you 50 load balancers, while behind Ingress they cost you one. So production clusters send HTTP traffic through Ingress and keep LoadBalancer Services for traffic Ingress handles poorly, like raw TCP for databases and UDP for game servers.
How would you debug a Service that's not routing traffic?
Show sample answerHide answerSay yours out loud first, then check.
Walk through four steps.
- Run
kubectl get endpoints (service-name)and check whether the Endpoints list is empty. Empty means the Service selector matches no Pods, so fix the selector or the Pod labels. - Run
kubectl describe podon one of the backend Pods. Confirm the container is Running and the port is listening (look at the Ports section). - Start a debug pod with
kubectl run(busybox or netshoot) and curl the Service ClusterIP directly. If that fails, you're looking at a CNI or NetworkPolicy problem. - Check the kube-proxy logs on the node where your debug pod ran.
Most Service problems end at step one, an empty endpoints list caused by a label typo.
Kubernetes troubleshooting interview questions (10 Q)#
No bucket decides more of these interviews than this one. The format is always a scenario: your pod is X, what do you check first? A pattern that works every time is to say the most likely cause, name the kubectl command you'd run to confirm it, and say what in the output would point to the real cause. Put most of your practice hours here.
Your pod is in CrashLoopBackOff. Walk me through your debug.
Show sample answerHide answerSay yours out loud first, then check.
CrashLoopBackOff means the container started, crashed, restarted and crashed again, and now the kubelet is backing off between restart attempts (10s, 20s, 40s, doubling up to 5 minutes). Start with kubectl describe pod and read the Events section for OOMKilled, failed probes or image errors. Then run kubectl logs --previous, because the current container hasn't started and plain kubectl logs returns nothing. The usual causes:
- an application bug at startup
- a missing env var or ConfigMap reference
- a liveness probe that fires too early while the app is still booting
- an OOMKill from a memory limit set too low
- the wrong command or args
Your pod is in ImagePullBackOff. What's wrong?
Show sample answerHide answerSay yours out loud first, then check.
The kubelet can't pull the container image. Three causes cover most cases. The image name is wrong (a typo, the wrong registry, the wrong tag). The image sits in a private registry and the Pod has no imagePullSecret configured. Or the registry is rate-limiting you or is down. kubectl describe pod shows the exact pull error under Events. The fix depends on which cause it is, but your first move is always describe.
Your pod is in Pending state. Why?
Show sample answerHide answerSay yours out loud first, then check.
Sort the causes into three buckets.
- Resources: no node has enough CPU or memory to fit the pod's requests. Shrink the requests, add nodes, or let the cluster autoscaler do it.
- Scheduling rules: the pod has affinity, anti-affinity or nodeSelector rules that no node satisfies, or it depends on a toleration for a taint that no node carries. Make the rules match the labels your nodes carry.
- Storage: the pod is waiting on a PersistentVolumeClaim that hasn't bound, usually because no StorageClass is set or no PersistentVolume is free. Run
kubectl get pvcand read its Events.
Either way, kubectl describe pod prints the scheduler's reasoning at the bottom.
Your pod is OOMKilled. What does that mean and how do you fix it?
Show sample answerHide answerSay yours out loud first, then check.
OOMKilled means the container went over its memory limit and the kernel killed it. You have two fixes. Raise the limit if the workload does need more memory, or track down and fix the memory leak in the app. kubectl describe pod shows OOMKilled under Last State in the Containers section, and kubectl top pod shows current usage if metrics-server is installed. A more senior follow-up asks whether you'd set memory limits at all (some teams skip them and rely on node-level pressure) and how you'd choose the number.
Your pod won't start because of a CreateContainerConfigError. What's wrong?
Show sample answerHide answerSay yours out loud first, then check.
Something the Pod spec points to is missing or malformed. Most often a ConfigMap or Secret it references doesn't exist, or doesn't have the key the spec expects. kubectl describe pod prints the exact error in Events ("couldn't find key X in ConfigMap Y"). Create the missing resource or fix the reference in the Pod spec.
Your service is up but no traffic is reaching the pods. Walk through your debug.
Show sample answerHide answerSay yours out loud first, then check.
The steps are the same as Q18, so say them quickly and add the node angle. Check kubectl get endpoints first; an empty list almost always means a label typo on the Pod or the Service. If endpoints exist, confirm a backend container is Running and listening on the right port, then curl the Service ClusterIP from a debug pod. If the curl fails, look at the CNI plugin and any NetworkPolicy. The extra point for this version: if kube-proxy is down on a node, every Service on that node breaks, so run kubectl get pods -n kube-system to check it.
DNS isn't resolving inside the cluster. What's the first thing you check?
Show sample answerHide answerSay yours out loud first, then check.
Run kubectl get pods -n kube-system | grep coredns. If the CoreDNS pods aren't Running, DNS is broken for the whole cluster. Use kubectl describe and kubectl logs on those pods to find out why (a config error, an OOMKill, a node failure). If CoreDNS looks healthy, exec into a pod that's having trouble and run nslookup against the cluster DNS service IP (often 10.96.0.10, or whatever your CoreDNS service IP happens to be). If that fails too, suspect a NetworkPolicy that blocks DNS or a CNI issue.
Your Deployment rolled out and now the app is broken. How do you roll back?
Show sample answerHide answerSay yours out loud first, then check.
Run kubectl rollout undo deployment/(name). It switches straight back to the previous ReplicaSet. If you need to go back more than one version, kubectl rollout history deployment/(name) lists the revisions. What the interviewer wants to hear is that rollback is a built-in Kubernetes operation, so you don't have to dig up old YAML and redeploy it.
Your pod's liveness probe is failing during startup. How do you fix it?
Show sample answerHide answerSay yours out loud first, then check.
There are two options. You can loosen the liveness probe so it waits until the app has booted (raise initialDelaySeconds, raise failureThreshold). The better option is a startup probe (Kubernetes 1.16+), which holds off the liveness probe completely until the app reports ready. The startup probe runs until it succeeds or times out, and the liveness probe only kicks in after that. For slow-starting apps it's the cleanest fix.
Your node is in NotReady state. What now?
Show sample answerHide answerSay yours out loud first, then check.
NotReady means the kubelet on that node has stopped reporting healthy to the control plane. kubectl describe node shows the Conditions and the last heartbeat. Common causes are a crashed kubelet, disk pressure on the node, a network partition, or a crashed container runtime. SSH into the node and check the kubelet logs and disk usage. After a tolerationSeconds window (5 minutes by default), the pods on that node go into Terminating.
Kubernetes security plus RBAC interview questions (5 Q)#
At the new-grad level the security questions stay shallow. The interviewer mostly wants to see that you know what RBAC is, and that you'd never put the dashboard on the public internet without auth.
What's RBAC in kubernetes?
Show sample answerHide answerSay yours out loud first, then check.
RBAC is Role-Based Access Control, the way Kubernetes decides who can do what against its API. Four resources matter:
- A Role grants permissions inside one namespace ("can read pods in the dev namespace").
- A ClusterRole grants permissions across the whole cluster ("can read pods in any namespace").
- A RoleBinding attaches a Role to a user, a group or a ServiceAccount.
- A ClusterRoleBinding does the same thing for a ClusterRole.
The classic new-grad mistake is mixing up users (humans, managed outside the cluster) with ServiceAccounts (in the cluster, tied to pods).
What's a ServiceAccount?
Show sample answerHide answerSay yours out loud first, then check.
A ServiceAccount is an identity that lives inside Kubernetes and belongs to pods. It's what a pod uses when it needs to call the Kubernetes API itself. Every pod runs as some ServiceAccount, and if you don't set one, it gets "default". When the pod calls the API, Kubernetes checks a token mounted into the pod from that ServiceAccount. The case interviewers like is a CI/CD agent pod that deploys other workloads: it runs as a ServiceAccount, and a RoleBinding gives it the permissions it needs. The trap is handing that ServiceAccount cluster-admin, which is far too broad. Grant only what the job needs.
How would you give a pod read-only access to ConfigMaps in its namespace?
Show sample answerHide answerSay yours out loud first, then check.
You need three resources, all in that namespace: a Role whose rules allow get, list and watch on configmaps, a ServiceAccount, and a RoleBinding that ties the Role to the ServiceAccount. Then set serviceAccountName in the Pod spec to the new ServiceAccount, and the Pod can read ConfigMaps through the Kubernetes API. Rattling off that three-piece pattern (Role, ServiceAccount, RoleBinding) is what earns you credibility here.
What's a Pod Security Standard?
Show sample answerHide answerSay yours out loud first, then check.
It's a built-in policy that limits what Pods are allowed to do, such as running as root, mounting the host filesystem, using host networking or running privileged containers. There are three levels: privileged (no limits), baseline (blocks the known-bad stuff) and restricted (hardened). You apply them per namespace with labels. They took over from PodSecurityPolicy, which was deprecated in 1.21 and removed in 1.25; the built-in Pod Security Admission controller enforces the standards now. For a new grad, knowing the levels exist and what each one does is enough.
How would you store a database password securely in kubernetes?
Show sample answerHide answerSay yours out loud first, then check.
Give three options, from weakest to strongest.
- A Secret resource, base64-encoded, with encryption at rest turned on for the cluster's etcd. It's acceptable for low-stakes environments.
- Sealed-secrets or external-secrets-operator, which encrypts the real secret with a key only the cluster holds, so the encrypted blob is safe to commit to git. That's better.
- An external secret manager (Vault, AWS Secrets Manager, GCP Secret Manager) with a CSI driver that injects the secret when the pod starts, so it never sits in etcd at all. That's the best choice for production.
The bar for a new grad is knowing that a base64 Secret is encoded, not encrypted.
kubectl interview questions (5 Q)#
These are less about explaining commands and more about typing the right one under pressure. The interviewer gives you a situation and you answer with the kubectl call you'd make.
What's the difference between kubectl apply and kubectl create?
Show sample answerHide answerSay yours out loud first, then check.
kubectl create is imperative. It makes a new resource and fails if that resource already exists. kubectl apply is declarative. It makes the cluster match your manifest: it creates the resource if it's missing, updates it if it's different, and merges with existing changes through a three-way diff. GitOps workflows in production use apply almost everywhere. The new-grad mistake is putting kubectl create in a CI pipeline that runs twice.
How do you see the logs of a previously-crashed container?
Show sample answerHide answerSay yours out loud first, then check.
Run kubectl logs (pod) --previous. In CrashLoopBackOff the current container hasn't started, so plain kubectl logs gives you nothing useful. The --previous flag shows the output of the last container that ran. If the pod has more than one container, add -c (container-name).
How do you exec into a running container?
Show sample answerHide answerSay yours out loud first, then check.
Run kubectl exec -it (pod) -- /bin/sh. The double dash separates kubectl's own flags from the command that runs inside the container. Use /bin/sh on minimal images (alpine, distroless) and /bin/bash on fuller ones. Add -c (container-name) if the pod has several containers. The -it flags make the session interactive and give you a TTY.
How do you watch events in a cluster sorted by time?
Show sample answerHide answerSay yours out loud first, then check.
Run kubectl get events --sort-by=.lastTimestamp. Events are how Kubernetes tells you what just happened: a pod got scheduled, an image got pulled, a container crashed, a probe failed. Without --sort-by they come back in close to random order (UID order), which is useless when you're debugging. This sorted version is one of the handiest commands in the whole kubectl toolbox.
How do you scale a Deployment?
Show sample answerHide answerSay yours out loud first, then check.
There are two ways. kubectl scale deployment (name) --replicas=5 is the imperative one-shot. Or you edit the Deployment YAML and apply it again, which is the GitOps-friendly way, and production teams almost always go that route. The imperative command is fine for a quick fix in the middle of an incident, but it no longer matches the declared state, so the next GitOps sync will undo it.
Kubernetes scenario-based interview questions (5 Q)#
These are design questions at small-to-medium scale. You're asked to build something, and you talk through which Kubernetes resources you'd combine and what tradeoffs you'd accept. New-grad versions stay small; senior versions push into multi-cluster and multi-region setups.
Design a small e-commerce backend on kubernetes.
Show sample answerHide answerSay yours out loud first, then check.
Start with three stateless Deployments, each behind a Service: an API gateway, a product-catalog service and an order-processing worker. Add one StatefulSet for Postgres with a PersistentVolumeClaim. Put non-secret config (the Postgres host, the log level) in a ConfigMap, and put the Postgres password plus any third-party API keys in a Secret. An Ingress routes api.example.com to the gateway Service. A HorizontalPodAutoscaler scales the gateway and order-processing Deployments on CPU. NetworkPolicies let only the order-processing pods reach the database. Name one tradeoff: Postgres in a StatefulSet is simpler, while managed Postgres outside the cluster gives you better HA and easier operations. Most production setups pick managed Postgres once they grow.
Design a daily batch job that processes 100GB of logs into a database.
Show sample answerHide answerSay yours out loud first, then check.
Use a CronJob with the schedule 0 2 * * *. The Pod streams the logs from object storage in chunks instead of loading 100GB into memory, and writes aggregates to the database using a connection string from a Secret. Give it realistic resource requests (4 CPU, 8GB memory), an activeDeadlineSeconds so a runaway job gets stopped, and a history limit so old Job records don't pile up. The tradeoff to name: one Pod working through the data serially, or a Job with parallelism above 1 that shards the work. Sharding is faster but adds coordination overhead, so it's only worth it when the serial run would take more than 30 minutes.
Design a real-time chat backend on kubernetes.
Show sample answerHide answerSay yours out loud first, then check.
A Deployment runs the stateless WebSocket gateway with 3+ replicas, behind a Service with sessionAffinity set to ClientIP so each user's WebSocket stays on one pod. A StatefulSet runs Redis for pub-sub. Another Deployment runs the worker that saves messages, and message history lives in a managed database or a Postgres StatefulSet. Use an Ingress that supports WebSockets, and put a HorizontalPodAutoscaler on the gateway that scales on connection count instead of CPU. The tradeoff is Redis in the cluster versus managed Redis. Managed wins on operations; in-cluster wins on cost and latency.
Design a CI/CD pipeline running on kubernetes.
Show sample answerHide answerSay yours out loud first, then check.
Run the CI/CD controller as a Deployment, with a ServiceAccount and a RoleBinding that let it deploy workloads. Each build gets its own Job as a build agent, in a dedicated namespace with resource quotas. Secrets hold the credentials for git, the registry and the deployment targets. A NetworkPolicy stops build agents from talking to anything except the registry, the git host and the controller. The tradeoff: a fresh Job per build is clean but slow, while long-lived build-agent Pods are fast but risk one build contaminating the next. Most teams go with per-build Jobs.
Design a feature-flag service that needs sub-100ms reads.
Show sample answerHide answerSay yours out loud first, then check.
Run the read service as a Deployment with 5+ replicas behind a ClusterIP Service. Each replica keeps an in-memory cache that refreshes from a backing store every 10s. The backing store (Redis) runs as its own StatefulSet. Writes go through a separate admin Deployment behind a different Service, and a NetworkPolicy keeps write traffic away from the read path. The tradeoff is cache freshness against read latency. A 10s refresh means flag changes arrive with eventual consistency, which is fine for most flags. When a change has to land instantly, push it over a pub-sub channel.
Kubernetes interview questions on what changed recently#
Interviewers in 2026 like to slip in one or two "what's new" questions, and the three that come up most are Ingress versus Gateway API, native sidecars, and which version you'd run. As of September 2026, the Kubernetes releases page lists 1.37 as the newest minor version (1.37.0, released August 26, 2026), and 1.36 and 1.35 are still getting patches. The project supports the three most recent minor releases, so a cluster that's two years old is already out of support.
Q. "Would you use Ingress or Gateway API for a new cluster?"
Say Gateway API, and give the reason in one breath: it splits the work by role, so a platform team owns the Gateway and each app team attaches its own HTTPRoutes. Then add the timing. In November 2025 the Kubernetes project announced that Ingress NGINX would get no releases or security fixes after March 2026, and named Gateway API as the way forward (the link is in Q8). Existing Ingress resources keep working, so you wouldn't rip up a working cluster in a panic. You'd plan the move.
Q. "How do sidecars work now?"
Before v1.28, a sidecar was just a second regular container, and nothing guaranteed it started first or stopped last. Native sidecars, stable since v1.33, are init containers with restartPolicy: Always. They start before the app containers, keep running for as long as the Pod lives, and shut down after the app does. The classic bug this fixes is a Job that never finishes because its log-shipping sidecar won't stop.
Q. "What replaced PodSecurityPolicy?"
Pod Security Admission, which is built in and applies the privileged, baseline and restricted levels through namespace labels (Q32 covers the levels). PodSecurityPolicy was deprecated in 1.21 and removed in 1.25. If a tutorial you learned from still uses PSP, say so. It shows you can tell which docs have gone stale.
How to prepare for kubernetes interview questions as a CS new grad#
Plan on about three weeks, and spend most of that time on a real cluster: build a small app on minikube or kind, break it on purpose, and fix it with kubectl while you talk out loud. Here are five moves, in the order that gets you to an offer fastest.
- Hands-on beats reading. Install minikube or kind on your laptop and deploy a two-tier app: a Deployment, a Postgres StatefulSet, a Service, a ConfigMap and a Secret. Write the YAML by hand instead of copying a tutorial. That one weekend teaches you more than three chapters of docs, because at some point you'll realize you don't know whether the selector goes inside spec or inside spec.template. That moment of confusion is the prep.
- Break it on purpose. Once the app runs, mistype a Service selector and watch the Endpoints vanish. Set a memory limit so low the pod gets OOMKilled. Point at a ConfigMap that doesn't exist. Every failure you debug on your own laptop is a scenario question you'll pass cold in an interview. It's the most underrated prep activity there is: most new grads study by reading, and the ones who pass scenario questions study by breaking things.
- Memorize these core commands.
kubectl get pods,describe pod,logs(with --previous and -c),exec,port-forward,apply,delete,edit,scale,rollout(status, undo, history),top, andget events --sort-by=.lastTimestamp. These are what you'll type during a live troubleshooting question, and the interviewer is grading your muscle memory. - Read three postmortems. Search "kubernetes postmortem" on Hacker News or on the engineering blogs of large infrastructure companies, and read three all the way through. A senior signal interviewers look for is whether you can talk about a failure the way someone who has read the incident reports does. You haven't run a production cluster, and that's fine. You've read about people who did, and that's the move.
- Run three timed mocks. Do one architecture mock, one scenario-only mock and one mixed mock that copies the target company's format. AI mock interview practice catches vocabulary slips as they happen, while human peer mocks give you the pressure of being watched. Use both. If you want live-narration reps without booking a partner, run a timed kubectl scenario in a practice session and practice saying the answer in your own voice before it counts.
Kubernetes interview format by role#
The same Kubernetes material gets tested differently across the five roles that ask these questions in 2026.
| Role | Architecture depth | Networking depth | Troubleshooting depth | Security / RBAC depth | YAML writing | Adjacent skills |
|---|---|---|---|---|---|---|
| DevOps engineer (junior) | High | Medium-High | High (scenario-heavy) | Medium | High | CI/CD, Helm, Docker |
| SRE (junior) | Medium-High | Medium | Highest (incident focus) | Medium | Medium | Observability, on-call, SLOs |
| Platform engineer (junior) | Highest | High | Medium | Medium-High | Highest | Helm, operators, CRDs |
| Software engineer (K8s tag) | Medium | Low | Low-Medium | Low | Medium | Application-level concerns |
| Cloud engineer (junior) | Medium | Medium | Medium | Medium | Medium | EKS / GKE / AKS specifics |
Two patterns stand out. Troubleshooting depth follows production responsibility: junior SREs get the toughest scenario questions and SWEs with a K8s tag get the lightest. YAML-writing depth follows how much the role builds the platform rather than just using it. Not sure which role you're aiming at? Prep to DevOps depth, as the buckets section says.
Common kubernetes interview mistakes for CS new grads#
Here are seven common mistakes new grads make in Kubernetes interviews.
1. Naming concepts without showing they've used them. A candidate who can recite "a Service puts a set of pods behind a stable virtual IP" but couldn't debug a Service that isn't routing traffic comes across as someone who watched a video, not someone who ran kubectl. The fix is hands-on work: install minikube, write a Deployment YAML by hand, break a Service by mistyping a selector label, and fix it by running kubectl get endpoints and spotting the empty list. That single exercise teaches more than three chapters of reading.
2. Confusing Deployments and StatefulSets. New grads tend to default to a Deployment because every tutorial uses one. The probe sounds like "would you use a Deployment or a StatefulSet for Postgres?" Answering Deployment without a pause tells the interviewer you haven't thought about stable identity or persistent storage. The right answer is a StatefulSet, with the reasoning attached.
3. Assuming Secrets are encrypted. Base64 is encoding. The belief that Secrets are encrypted by default falls apart as soon as the interviewer asks what protects a Secret from a developer with read access to the cluster. The real answer: encryption at rest on etcd, plus an external secret manager for high-stakes material.
4. Skipping --previous in kubectl logs. The pod is in CrashLoopBackOff. The candidate runs kubectl logs, sees nothing and freezes. The --previous flag shows the logs of the container that crashed. Knowing that one flag gets you through a question that otherwise stalls the whole interview.
5. Naming kube-proxy as if it's a separate cluster component you'd never touch. kube-proxy writes the iptables rules that make Services work, so if it's down on a node, every Service on that node breaks. A candidate who treats kube-proxy as a black box can't debug that outage.
6. Not knowing where to look for events. Most Kubernetes failures (image pulls, scheduling, probes, OOMKills) show up in the Events section of kubectl describe pod, or in kubectl get events sorted by .lastTimestamp. Candidates who don't know to look there burn 5 minutes naming commands that don't help.
7. Skipping the YAML. If you've only read about Deployments and never written one, you won't know whether spec.selector.matchLabels has to match spec.template.metadata.labels by convention or by enforcement. It's enforced, as of Kubernetes 1.16+. The candidate who has written 10 Deployment YAMLs knows that. The one who has only read about them doesn't.
One thing I'd add from watching new grads work through this list: don't try to memorize all seven. Pick the two that match your weakest spot (most likely #1 and #4) and build a weekend exercise around fixing them. Spin up minikube on a Saturday morning, deploy a broken app on purpose, and debug it. Once that muscle memory is there, the other five mostly take care of themselves.
Key terms#
Pod / Deployment / ReplicaSet / StatefulSet / DaemonSet: A Pod is the smallest deployable unit, one or more containers on a single node. A Deployment is the higher-level controller for stateless workloads, and it handles rolling updates through a ReplicaSet, which keeps the replica count steady. A StatefulSet is for workloads that need stable identities and persistent per-pod storage (databases, leader-election systems). A DaemonSet makes sure one Pod runs on every matching node (log collectors, metrics agents).
Service / Ingress / NetworkPolicy: A Service is a stable virtual IP and DNS name in front of a changing set of Pod IPs, implemented by kube-proxy through iptables rules (or nftables rules on newer clusters; IPVS mode is deprecated). An Ingress is a higher-level HTTP routing layer behind a single LoadBalancer, with the rules carried out by an ingress controller (traefik, haproxy, or a cloud provider's). Gateway API is the newer, role-split replacement the project now recommends. A NetworkPolicy limits pod-to-pod traffic at the network layer; it's opt-in and depends on the CNI.
ConfigMap / Secret: Key-value stores mounted into pods as env vars or files. ConfigMaps hold non-sensitive config (URLs, feature flags). Secrets hold sensitive data (API keys, passwords) and are base64-encoded by default, which is encoding, not encryption. Production clusters add encryption at rest for Secrets in etcd and often use an external secret manager for the most sensitive material.
CrashLoopBackOff / ImagePullBackOff / OOMKilled / Pending: The four pod states you'll see most in debug scenarios. CrashLoopBackOff: the container starts, crashes and restarts with a growing backoff. ImagePullBackOff: the kubelet can't pull the image (a typo, a missing imagePullSecret, a registry that's down). OOMKilled: the container went over its memory limit and the kernel killed it. Pending: the pod can't be scheduled (no node has room, the scheduling rules don't match, or the PVC hasn't bound).
RBAC: Role / RoleBinding / ClusterRole / ClusterRoleBinding / ServiceAccount: Role-Based Access Control. A Role grants permissions in one namespace, and a ClusterRole grants them across the cluster. A RoleBinding attaches a Role to a user, group or ServiceAccount in a namespace, and a ClusterRoleBinding does the same cluster-wide. A ServiceAccount is the Kubernetes-native identity for pods themselves, used when a pod calls the Kubernetes API.
CNI / CRI / kubelet / kube-proxy / etcd: The control-plane and data-plane vocabulary. CNI (Container Network Interface) is the plugin model for pod networking (Calico, Cilium, Flannel). CRI (Container Runtime Interface) is the plugin model for container runtimes (containerd, CRI-O). The kubelet is the agent on every node that watches the API server and starts the right pods. kube-proxy is the per-node component that programs iptables rules (or nftables rules on newer clusters; IPVS mode is deprecated) so Services work. etcd is where the whole cluster state lives, in a distributed key-value store.
Related guides#
A CS new grad aiming for DevOps or platform roles in 2026 will face several kinds of technical interview besides the Kubernetes one. These guides cover the neighboring gaps.
- System design basics for new grads: platform-engineer and SRE loops often pair a system-design round with the Kubernetes questions, and the framework carries over.
- Python interview questions: most DevOps and SRE roles test Python too, at the level of scripts and tooling. The depth is light but the range is wide.
- Data engineer interview questions: the data engineering round shares the YAML-and-pipeline vocabulary with Kubernetes interviews. Skim it if you're weighing both paths.
- Technical phone screen tactics: the phone screen looks much the same across SWE, DevOps and SRE pipelines. The content differs (more kubectl, less LeetCode), but the structure doesn't.
- Mock interview practice methodology: its four modes (solo, peer, paid, AI) suit Kubernetes prep well, since scenario questions reward practice at narrating out loud.
- AI mock interviewers vs live interview copilots: two different kinds of tool get sold as AI interview help. This guide sorts out which one runs your timed scenario mocks and which one runs during the real round.
Find your gap, jump to the matching guide, close it, then come back to Kubernetes prep. That's the loop.
The Kubernetes interview in 2026 rewards candidates who have run a cluster over those who have only read about one. Two weekends with minikube close most of that gap. Three weeks of focused prep (hands-on work, the docs, scenario drills, postmortems, mocks) gets you interview-ready for junior DevOps, junior SRE and junior platform-engineer pipelines. You'll face less LeetCode pressure than in a pure SWE loop, and there are more entry-level openings on the platform side as companies grow their infrastructure teams.
InterviewChamp.AI runs realistic Kubernetes mocks that show up on every interview surface: the live troubleshooting whiteboard, the architecture-design conversation, the kubectl scenario round. One install, every surface. Start a practice session, narrate your debug as you work through the scenario, and walk into Monday's phone screen ready.
About the author: Sam K. is the founder of InterviewChamp.AI, building AI interview prep for the new-grad CS market and writing about the modern interview gauntlet from the inside.
Originally published on InterviewChamp.AI
Related guides
AI Interview Tools 2026: A Buyer's Guide for CS New Grads
The phrase "AI interview" means three different things in 2026 and most candidates land on the wrong page for their actual problem. It can mean a candidate using AI to help during an interview, an employer using AI to score candidates without a human in the room, or an AI bot that runs an entire mock interview for prep. This guide untangles all three, walks through the seven decision criteria that matter when picking a candidate-side AI tool, covers what interviewers can actually detect in 2026, and lays out a $1,847-budget allocation a real CS new grad can copy. Honest-prep voice. No "100% undetectable" claims. No competitor names.
Sam K. ·
Read more →CoderPad Alternatives 2026: 6 Tools — Platform Swap or Candidate Help?
CoderPad is the live-coding interview platform that recruiters and hiring managers use to run human-led technical rounds in 2026. Most people searching for CoderPad alternatives are doing one of two things: an employer shopping for a different platform to run interviews on, or a candidate looking for help with a CoderPad round they have coming up. This guide covers both. Six tools compared honestly, with InterviewChamp positioned as the candidate-side helper for practice and, where the company allows it, for live coding rounds on any platform, not just CoderPad.
Sam K. ·
Read more →InterviewAI Alternatives in 2026: 7 Tools Compared (Mock Practice + Live Interview Copilots)
InterviewAI is the umbrella name people search when they want an AI mock interviewer, an AI that scores async video answers, or a real-time interview helper that surfaces answers during a live round. Three different products live under that one phrase, and the searcher usually wants one of them but lands on a page about the other two. This guide untangles the category, ranks the 7 alternatives most CS new grads actually compare in 2026 (split into mock-practice tools and live-interview copilots), names the price points and ToS posture on each, and gives a one-page decision tree by avatar so Jordan-types stop wasting weekends on the wrong product.
Sam K. ·
Read more →Frequently asked questions
- What kubernetes interview questions should I prepare for in 2026?
- Prepare across five buckets: architecture (Pod, Deployment, StatefulSet, DaemonSet, Service, Ingress, ConfigMap, Secret), networking (CNI, Service types, NetworkPolicy, kube-proxy, DNS, Ingress vs LoadBalancer), troubleshooting (CrashLoopBackOff, Pending, ImagePullBackOff, OOMKilled, DNS resolution failures, kubectl describe workflow), security plus RBAC (Roles, RoleBindings, ServiceAccounts, Pod Security), and kubectl command fluency (the 10-15 commands you'll actually type during a live troubleshooting question). Scenario-format questions (your pod is X, what do you check first) carry the most weight at the new-grad bar because they screen for whether you've actually used kubectl on a real cluster or just read about it.
- What's the difference between a Pod and a Deployment in kubernetes?
- A Pod is the smallest deployable unit in kubernetes, one or more containers sharing network and storage, running on a single node. A Deployment is a higher-level controller that manages a set of identical Pods through a ReplicaSet, handling rolling updates, rollbacks, and the desired-state-vs-actual-state reconciliation loop. You almost never create raw Pods in production. You create a Deployment, the Deployment creates a ReplicaSet, the ReplicaSet creates Pods. The exception is one-shot Jobs or system-level workloads where the lifecycle is intentional.
- What is a StatefulSet and when should I use one over a Deployment?
- A StatefulSet is the workload type for applications that need stable network identities, ordered startup and shutdown, and persistent per-pod storage. Examples: databases (Postgres, MongoDB), distributed systems with leader election (Kafka, etcd), and anything where pod-1 must always be pod-1 with the same hostname and the same volume. Use a Deployment when your pods are interchangeable (stateless web servers, API workers). Use a StatefulSet when each pod has its own identity. The interview-relevant signal is whether you state the criterion (stable identity plus persistent storage) rather than parroting 'StatefulSet for stateful apps.'
- What is CrashLoopBackOff and how do you debug it?
- CrashLoopBackOff is the status kubernetes assigns when a container starts, crashes, restarts, crashes again, and the kubelet starts backing off the restart attempts (10s, 20s, 40s, doubling up to 5 minutes). The fix workflow: run kubectl describe pod to see the recent events, then kubectl logs --previous to see the output of the crashed container (the current container hasn't started, so kubectl logs alone returns nothing useful). Common causes: application bug crashing on startup, missing environment variable or ConfigMap, failed liveness probe, OOM kill (check the Events for OOMKilled), wrong command or args. The interview value is showing the workflow, not just naming a cause.
- What is the difference between a Service ClusterIP, NodePort, and LoadBalancer?
- ClusterIP is the default, an internal-only virtual IP reachable from inside the cluster, used for service-to-service communication. NodePort exposes the service on a static port on every node's IP, useful for development and bare-metal clusters without a cloud LoadBalancer. LoadBalancer provisions an external cloud load balancer (ELB on AWS, an external IP on GCP) that fronts the service, the standard production pattern for exposing HTTP services to the internet. The follow-up question is usually Ingress, a higher-level construct that lets you route many hostnames or paths through a single LoadBalancer using an ingress controller (nginx, traefik).
- What is the difference between kubectl apply and kubectl create?
- kubectl create is imperative: create a new resource, fail if it already exists. kubectl apply is declarative: ensure the cluster matches this manifest, create if missing, update if different, merge with existing changes via a three-way diff (last-applied annotation, current cluster state, new manifest). Production GitOps workflows are almost always declarative (kubectl apply, or higher-level tools like Argo CD or Flux). The new-grad mistake is using kubectl create in a CI/CD pipeline, which fails on the second run.
- What is a ConfigMap and how is it different from a Secret?
- Both are key-value stores that pods mount as environment variables or files. ConfigMaps hold non-sensitive configuration (feature flags, URLs, log levels). Secrets hold sensitive data (API keys, database passwords, TLS certs) and are stored base64-encoded by default. Base64 is encoding, not encryption, so anyone with cluster read access can decode a Secret. Production clusters enable encryption-at-rest for Secrets and often layer in an external secret manager (sealed-secrets, Vault, cloud KMS) for the actual sensitive material.
- How does kubernetes networking work?
- Three rules. First, every pod gets its own IP address from a flat cluster network, no NAT required for pod-to-pod traffic. Second, pods on the same node and pods on different nodes communicate the same way (the network is flat from the pod's perspective). Third, the Service abstraction (ClusterIP, NodePort, LoadBalancer) provides a stable virtual IP and DNS name in front of a dynamic set of pod IPs. The actual implementation lives in the CNI plugin (Calico, Cilium, Flannel, Weave) which is installed at cluster bootstrap and handles the routing. kube-proxy programs iptables or IPVS rules to route Service IPs to pod IPs.
- What is a NetworkPolicy in kubernetes?
- A NetworkPolicy is a kubernetes resource that restricts which pods can talk to which other pods at the network layer. Without policies, all pods in a cluster can reach all other pods by default (a flat network is permissive). A NetworkPolicy lets you write rules like 'pods in the frontend namespace can reach pods in the backend namespace on port 8080, nothing else.' NetworkPolicies require a CNI plugin that supports them (Calico, Cilium yes; Flannel out-of-the-box no). The interview signal is knowing that NetworkPolicy is opt-in and CNI-dependent, not a built-in kubernetes feature in the way Services are.
- How do I prepare for a kubernetes interview as a CS new grad?
- Three weeks of focused work. Week 1: install minikube or kind locally, deploy a simple two-tier web app (frontend Deployment plus Postgres StatefulSet plus a Service plus a ConfigMap plus a Secret), break it deliberately and fix it. Week 2: read the kubernetes documentation cover-to-cover for Pods, Deployments, Services, ConfigMaps, Secrets, RBAC. Memorize the 15 kubectl commands you'll use in a live troubleshooting question. Week 3: drill scenario questions out loud (your pod is CrashLoopBackOff'ing, what do you check), read 3-5 public postmortems from companies that had production kubernetes incidents, run timed mock interviews. The single biggest accelerant is hands-on practice. Knowing what kubectl describe pod outputs in a real failure is worth ten hours of reading.
- What is RBAC in kubernetes?
- Role-Based Access Control. The mechanism kubernetes uses to decide who can do what against the API. Four resources matter. A Role grants permissions within a single namespace ('can read pods in the dev namespace'). A ClusterRole grants permissions cluster-wide ('can read pods in any namespace'). A RoleBinding attaches a Role to a user, group, or ServiceAccount. A ClusterRoleBinding does the same for a ClusterRole. ServiceAccounts are the kubernetes-native identity for pods. The new-grad mistake is conflating users (human, external) with ServiceAccounts (in-cluster, pod-bound).
- What is etcd and why does it matter?
- etcd is the distributed key-value store that holds the entire kubernetes cluster state, every Pod spec, every Service, every Secret, every Node registration. It runs as a separate process (or cluster of processes for HA) on the control plane nodes. The kubernetes API server talks to etcd; nothing else does. The interview-relevant facts: etcd uses the Raft consensus algorithm for HA, losing quorum (more than half the etcd nodes) means the cluster API stops working, and etcd backups are how you recover from a control-plane disaster. The new-grad version of this question is usually just 'what's etcd', the senior version probes the consensus and HA details.
- What does kubectl describe pod actually tell you?
- Six things in roughly this order. First, the pod's labels and annotations (useful for confirming you're looking at the right pod). Second, the node it's scheduled on (or Pending if unscheduled). Third, the IP address and pod-IP (useful for networking debugging). Fourth, each container's state (Running, Waiting, Terminated) and the last 5 reasons for state changes. Fifth, volumes mounted into the pod. Sixth, the Events list at the bottom, which is the single most useful debugging signal in kubernetes (image pull failures, scheduling failures, probe failures, OOMKills, all surface here). When someone says 'check kubectl describe pod first', they mean read the Events list at the bottom.
- What is the difference between liveness and readiness probes?
- Both are health checks kubernetes runs against your container. A liveness probe answers 'is this container still alive', if it fails repeatedly the kubelet kills and restarts the container. A readiness probe answers 'is this container ready to serve traffic', if it fails the pod is removed from Service endpoints but the container is not killed. The classic mistake is conflating them. Setting a liveness probe that fails during slow startup causes endless restart loops; the fix is a startup probe (kubernetes 1.16+) that gates the liveness probe until the application has bootstrapped.
- Why does my pod stay in Pending state?
- Three buckets of causes. Resource buckets: no node has enough CPU or memory to fit the pod's requests. The fix is either smaller requests, more nodes, or cluster autoscaler. Scheduling buckets: the pod has affinity, anti-affinity, or nodeSelector rules that no node satisfies, or it tolerates a taint that no node has. The fix is matching the scheduling rules to the actual node labels. PVC buckets: the pod is waiting on a PersistentVolumeClaim that hasn't bound yet, often because no StorageClass is set or no PersistentVolume is available. The fix is checking kubectl get pvc and looking at the Events. kubectl describe pod shows the scheduler's reasoning at the bottom of Events.
- What's the most common kubernetes interview mistake CS new grads make?
- Naming concepts without showing they've used them. A candidate who can recite 'a Service abstracts a set of pods behind a stable virtual IP' but who would not know how to debug a Service that's not routing traffic reads as someone who watched a video, not someone who ran kubectl. The fix is hands-on: install minikube, write a Deployment YAML by hand, break a Service by mistyping a selector label, fix it by running kubectl get endpoints and noticing the empty list. That single experience teaches more than three chapters of reading.