Kubernetes Interview Questions — Real Practice Quiz

Reviewed by Mark Dickie · Last updated

Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications across a cluster of machines. For interviews, you should be fluent in the core object model (Pods, Deployments, Services, ConfigMaps, Secrets), understand how the control plane components interact, and be able to reason about scheduling, networking, and failure scenarios. Expect questions that test both conceptual knowledge and hands-on debugging — things like why a Pod is stuck in Pending, how a Service routes traffic, or what happens when a node dies.

AreaWhat comes up in interviews
Pod lifecycleStates, restart policies, init containers, probes (liveness/readiness/startup)
Workload controllersDeployments, ReplicaSets, StatefulSets, DaemonSets, Jobs — when to use each
NetworkingServices (ClusterIP, NodePort, LoadBalancer), Ingress, DNS, CNI basics
StoragePersistentVolumes, PersistentVolumeClaims, StorageClasses, access modes
Scheduling & scalingRequests/limits, node affinity, taints/tolerations, HPA, VPA
SecurityRBAC, ServiceAccounts, PodSecurityPolicies/Admission, network policies
Troubleshootingkubectl commands, log analysis, event inspection, common failure patterns

What does a Kubernetes interview typically cover?

Most interviews split into three layers:

  1. Architecture fundamentals — explain the control plane (API server, etcd, scheduler, controller manager) and how a worker node registers and runs workloads via kubelet and kube-proxy.
  2. Day-to-day operations — writing or reading YAML manifests, understanding rollouts and rollbacks, configuring probes, and managing configuration/secrets.
  3. Failure-mode reasoning — diagnosing why a Pod won't schedule, why a Service has no endpoints, why a rollout stalled, or how a rolling update behaves under resource pressure.

How should I prepare if I have limited hands-on experience?

  1. Spin up a local cluster with minikube or kind and deploy a multi-replica application with a Service in front of it.
  2. Force failures: delete a Pod and watch the controller recreate it; cordon a node and observe rescheduling; set impossible resource requests and read the events.
  3. Practice reading kubectl describe and kubectl get events output until you can spot the common causes (Insufficient CPU, image pull errors, crash loops, missing ServiceAccount permissions) in seconds.
  4. Write manifests from memory for a Deployment, a Service, a ConfigMap, and an Ingress — being able to produce correct YAML under time pressure is a frequent interview ask.

The quiz below pulls from real interview questions across these areas, so you can check which topics need more study before you walk in.

Key facts

  • Tarmac has 98 Kubernetes interview questions on this topic, 10 of them on this page, at difficulty 1–5 of 5.
  • Tarmac last reviewed these Kubernetes interview questions on 23 August 2026.

At a glance

Questions10 shown · 98 in the bank
Difficulty1–5 of 5
FormatsFlashcard, Multiple choice, True / false, Fill in the blank, Code output, Multiple answer, Find the bug, Ordering, Design exercise, Short answer

What you'll review

  1. pods
  2. service types
  3. kubectl
  4. labels selectors
  5. replica scaling
  6. deployments
  7. pod lifecycle
  8. deployment strategies
  9. hpa

Practice questions

Kubernetes/k8s-workloads/pods

What is a Pod in Kubernetes?#

Show answer

The smallest deployable unit in Kubernetes: one or more containers that are always scheduled together on the same node and share a network namespace (one IP, reachable on localhost) and can share storage volumes. You rarely create bare Pods directly — a controller like a Deployment or StatefulSet creates and manages them.

Why:

A Pod, not a container, is the unit Kubernetes schedules. Grasping that containers in a Pod share network and can share storage explains the sidecar pattern and why a Pod has a single IP.

Kubernetes/k8s-networking/service-types

You create a Service and omit the type field entirely. What type does Kubernetes give it?#

Options

Show answer

A Service with no type field defaults to ClusterIP, giving it a stable virtual IP that is reachable only from within the cluster. NodePort and LoadBalancer extend ClusterIP to expose the Service externally, and ExternalName maps the Service to an external DNS name. Omitting type when you wanted external access leaves the Service internal-only.

Why:

ClusterIP is the default: the Service gets a stable virtual IP reachable only from inside the cluster. NodePort and LoadBalancer build on top of it to expose the Service externally, and ExternalName is a special DNS-alias type that points at an out-of-cluster host. If you forget type expecting external reach, your Service is silently internal-only.

Kubernetes/k8s-workloads/pods

A Pod can contain more than one container, and containers in the same Pod share a network namespace, so they can reach each other over localhost.#

Options

Show answer

True. A Pod is the smallest deployable unit and can hold multiple containers — the sidecar pattern. Containers in one Pod share its network namespace and IP address, so they reach each other over localhost on different ports, and they can share mounted volumes. They do not share a filesystem by default, which is why a proxy or logging sidecar can talk to the main container with no Service in between.

Why:

A Pod is the smallest deployable unit and may hold multiple containers (the sidecar pattern). They share the Pod's network namespace and IP, so they communicate over localhost on different ports, and they can share volumes. They do not share a filesystem by default. This is why a logging or proxy sidecar can talk to the main container without any Service in between.

Kubernetes/k8s-operations/kubectl

To imperatively change a running Deployment named web to 5 replicas, run: kubectl _____ deployment web --replicas=5.#

Show answer

To imperatively change a running Deployment named web to 5 replicas, run: kubectl **scale** deployment web --replicas=5.

Why:

kubectl scale updates the replica count on a controller in place. It's the quick imperative path; the declarative equivalent is editing replicas in the manifest and re-applying, which also survives the next kubectl apply.

Kubernetes/k8s-operations/labels-selectors

These three Pods exist, and a Service uses the selector shown. How many Pods does the Service include in its endpoints?#

# Running Pods and their labels:
#   web-1    app=web, env=prod
#   web-2    app=web, env=dev
#   web-3    app=web, env=prod

# Service:
spec:
  selector:
    app: web
    env: prod

Options

Show answer
2 (web-1 and web-3)
Why:

A label selector with multiple keys is a logical AND: a Pod must match every key/value to be selected. Only web-1 and web-3 have both app=web and env=prod; web-2 is excluded by env=dev. People often read it as OR (and expect 3) or assume one label per selector. This AND semantics is also why a Deployment whose selector doesn't fully match its template labels manages nothing.

Kubernetes/k8s-scaling/replica-scaling

A Deployment is set to replicas: 3 and currently has 3 running Pods. Select all events after which Kubernetes will automatically bring the running count back to 3.#

Options

Pick every one that applies.

Show answer

A Deployment's ReplicaSet reconciles the actual Pod count toward the desired count, so it recreates Pods after a manual kubectl delete pod or after a node is drained — both drop the count below the target. Scaling to 1 changes the desired state itself, so nothing is recreated, and an in-place container restart never lowered the Pod count. The key distinction is desired-state changes versus actual-state drift.

Why:

The ReplicaSet continuously reconciles actual Pods toward the desired count. Manually deleting a Pod (a) or losing a Pod when its node is drained (b) both drop the count below 3, so the controller creates replacements. Scaling to 1 (c) changes the desired state — 1 Pod is now correct, nothing is recreated. An in-place container restart (d) never reduced the Pod count, so there's nothing to recreate. The distinction between 'desired state changed' and 'actual state drifted' is the core of how controllers behave.

Kubernetes/k8s-workloads/deployments

This Deployment is rejected by the API server. What's wrong?#

apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: frontend
    spec:
      containers:
        - name: web
          image: nginx:1.27

Options

Show answer

spec.selector.matchLabels (app: web) doesn't match the Pod template's labels (app: frontend)

Why:

A Deployment's selector must match the labels on its Pod template — that's how it claims the Pods it creates. Here the selector looks for app: web but the template stamps app: frontend, so the controller could never find its own Pods; the API server rejects this at admission. apps/v1 is the correct (and only served) API version, ports is optional, and replicas don't require resource requests. Selector/label drift is one of the most common Deployment authoring bugs.

Kubernetes/k8s-health/pod-lifecycle

Order the steps from running kubectl apply -f pod.yaml to the container actually running on a node.#

Put these in order

Show answer
  1. kubectl sends the manifest to the kube-apiserver
  2. The API server validates it and writes the Pod object to etcd
  3. The kube-scheduler picks a suitable node and binds the Pod to it
  4. The kubelet on that node notices the assignment and pulls the image
  5. The container runtime starts the container and the kubelet reports it Running
Why:

This is the canonical control-plane flow: the API server is the front door and the only writer to etcd; the scheduler reacts to the unscheduled Pod and binds it to a node; the kubelet on that node reacts to the binding and drives the runtime to pull and start the container. Each component watches the API server and acts on what it sees — nobody calls anybody directly. Knowing this order is what lets you reason about where a stuck Pod is stuck (Pending = not yet scheduled; ContainerCreating = kubelet/runtime stage).

Kubernetes/k8s-rollouts/deployment-strategies

Design a highly-available, zero-downtime deployment of a stateless HTTP API on Kubernetes.#

Show answer

Workload. A Deployment, minimum 3 replicas (one per AZ as a floor). Each container sets CPU/memory requests so the scheduler can place and reserve correctly, with limits set to avoid noisy-neighbour blast radius (memory limit ≈ request to stay near Guaranteed for the critical tier).

Health. readinessProbe gates Service traffic; livenessProbe restarts a wedged container; a startupProbe (or generous initialDelay) covers the 30s cache warm-up so liveness doesn't kill a slow starter and traffic isn't routed until caches are warm.

Availability. topologySpreadConstraints across topology.kubernetes.io/zone (and hostname) so replicas are balanced over AZs and nodes — a single node or AZ loss removes at most ~1/3 of capacity. A PodDisruptionBudget (minAvailable: 2 or maxUnavailable: 1) protects against voluntary disruption during drains/upgrades.

Rollout. RollingUpdate with maxUnavailable: 0, maxSurge: 1 (or 25%), readiness-gated so only ready Pods receive traffic. A preStop hook + SIGTERM handling with a terminationGracePeriod drains in-flight requests (deregister from endpoints, finish, then exit). kubectl rollout undo for fast rollback on a bad deploy.

Scaling. An HPA (CPU or RPS/custom metric) from min 3 to a peak-sized max absorbs the 5× swing; Cluster Autoscaler adds nodes when Pods would otherwise stay Pending. Keep a replica floor for headroom because scale-up isn't instant.

Failure modes. Node loss → spread + controller reschedules survivors. AZ loss → spread caps the damage, LB routes to healthy AZs, HPA/CA backfill. Bad deploy → readiness gating stalls the rollout, PDB protects capacity, rollout undo reverts. Autoscaler lag → replica floor + surge headroom. Ingress/LB health checks pull unhealthy Pods/nodes out.

Why:

A strong answer treats 'highly available' as concrete mechanisms, not a buzzword: multiple replicas spread across failure domains (topology spread / anti-affinity), a PodDisruptionBudget for voluntary disruptions, readiness-gated rolling updates with graceful shutdown for deploys, and an HPA + Cluster Autoscaler for the traffic swing. The recurring interview signal is whether the candidate separates readiness from liveness and remembers that spreading replicas is what actually survives a node/AZ failure.

Kubernetes/k8s-scaling/hpa

In a Kubernetes HPA (autoscaling/v2) configured with an External metric source, what are the two valid values for target.type, and how does each one affect the scaling calculation? Also, why is target.type: Utilization not valid for External metrics?#

Show answer

For External metrics, the two valid target types are Value and AverageValue. With Value, the HPA compares the raw aggregated metric total to the target and computes desiredReplicas = ceil(currentReplicas * (rawMetricValue / targetValue)). With AverageValue, the raw aggregated metric is divided by the current replica count first to produce a per-replica figure, and desiredReplicas = ceil(rawMetricValue / targetAverageValue). Utilization is invalid for External (and Pods) metrics because utilization is defined as a percentage of a pod's resource request, a concept that only applies to built-in Resource metrics (CPU and memory).

Why:

External metrics in HPA v2 use type: External with a metric.name and optional metric.selector. The MetricTarget.Type field accepts only Value or AverageValue for External metric sources. For Value, the HPA controller retrieves the raw aggregated (summed) metric value and computes desiredReplicas = ceil(currentReplicas * (rawMetricValue / targetValue)) — it multiplies the current replica count by the ratio of the raw metric to the target, scaling the replica count proportionally to how far off the metric is from the target. For AverageValue, the HPA divides the raw aggregated metric by the current replica count to get a per-replica average, then computes desiredReplicas = ceil(rawMetricValue / targetAverageValue). The key behavioral difference is that Value treats the metric as a cluster-wide total and applies a ratio against current replicas, while AverageValue normalizes the metric per replica before comparing. Utilization is exclusively valid for Resource metric sources (CPU/memory) because it expresses usage as a percentage of a pod's configured resource request — a concept that has no meaning for external time-series or queue metrics.

Related interview questions

The other 88 questions

This page shows 10. A free account opens the rest and marks your answers, which a page of answers can't do. Miss one and it returns a few days later, then a week after that, until you stop missing it.

Start free

Free · the whole bank · 100 graded answers per 30 days · written feedback and job-ad quizzes on the paid plan

What moved, monthly

One email a month when the bulletin comes out: what moved in the markets we track, and the new question topics we published. Confirm your address to join. Unsubscribe any time.