Interview questions & answers

Kubernetes interview questions & answers

What are the most common Kubernetes interview questions?

Kubernetes is an open-source platform for automating the deployment, scaling, and management of containerized applications across a cluster of machines. It groups containers into pods and keeps the desired number running, healing failures and balancing load automatically. Interviews test the core objects (pods, deployments, services), the control-plane architecture, and how Kubernetes achieves scaling and self-healing.

Updated 2026-06-18 · 16 real, commonly-asked questions with answers.

Key takeaways

  • Kubernetes is an open-source platform for automating the deployment, scaling, and management of containerized applications across a cluster of machines.
  • Core areas to revise for Kubernetes: Pods & deployments, Services & networking, Control plane & nodes, ReplicaSets & scaling, Self-healing & probes.
  • This guide answers 16 of the most-asked Kubernetes interview questions — rehearse them in OnJob's free AI mock interview.
Pods & deploymentsServices & networkingControl plane & nodesReplicaSets & scalingSelf-healing & probesConfigMaps & SecretsRolling updates & rollbacksStatefulSets & DaemonSets

Top 16 Kubernetes interview questions

Q1.What is a pod in Kubernetes?

A pod is the smallest deployable unit in Kubernetes: one or more tightly coupled containers that share the same network namespace (IP and port space) and storage volumes. Containers in a pod are always scheduled together on the same node. Most pods run a single container, but a pod can include helper sidecar containers that support the main one.

Q2.What is the difference between a pod and a deployment?

A pod is a single running instance of your containers and is ephemeral; if it dies it is not recreated on its own. A Deployment is a higher-level controller that manages a set of identical pods through a ReplicaSet, ensuring the desired number stay running and enabling rolling updates and rollbacks. You almost always create Deployments rather than bare pods.

Q3.What is a Kubernetes Service and why is it needed?

Pods are ephemeral and get new IP addresses when recreated, so a Service provides a stable virtual IP and DNS name that routes traffic to a changing set of pods selected by labels. It load-balances across the matching pods. Types include ClusterIP (internal only), NodePort (exposes a port on each node), and LoadBalancer (provisions an external load balancer).

Q4.What is a ReplicaSet?

A ReplicaSet ensures that a specified number of identical pod replicas are running at any time, recreating pods that fail or are deleted. It uses a label selector to identify the pods it manages. You rarely create ReplicaSets directly; a Deployment creates and manages them for you and adds rolling-update capabilities on top.

Q5.Explain the Kubernetes control plane components.

The control plane manages the cluster: the API server is the front end that all components and users talk to; etcd is the consistent key-value store holding cluster state; the scheduler assigns new pods to nodes; and the controller manager runs controllers that drive actual state toward the desired state. The cloud-controller-manager integrates with the underlying cloud provider.

Q6.What runs on a worker node?

Each worker node runs the kubelet, which communicates with the control plane and ensures the containers described in its pods are running and healthy; the container runtime (such as containerd) that actually runs the containers; and kube-proxy, which maintains network rules so Services can route traffic to the right pods. Worker nodes are where your application pods execute.

Q7.How does Kubernetes achieve self-healing?

Kubernetes continuously compares the actual state of the cluster to the desired state you declared and corrects drift. If a pod crashes, its controller (such as a Deployment's ReplicaSet) starts a replacement; if a node fails, its pods are rescheduled onto healthy nodes; and liveness probes restart unhealthy containers. This reconciliation loop is the heart of its self-healing.

Q8.What is the difference between a liveness and a readiness probe?

A liveness probe checks whether a container is still healthy; if it fails, Kubernetes restarts the container. A readiness probe checks whether a container is ready to receive traffic; if it fails, the pod is temporarily removed from Service endpoints but not restarted. Liveness recovers stuck apps; readiness keeps traffic away from pods that are still starting up or busy.

Q9.What is a namespace in Kubernetes?

A namespace is a virtual cluster within a physical cluster that partitions resources, providing scope for names and a boundary for resource quotas and access control. It lets multiple teams or environments (such as dev and staging) share one cluster without naming collisions. Default resources live in the default namespace, and system components live in kube-system.

Q10.What is a ConfigMap and a Secret?

A ConfigMap stores non-confidential configuration data as key-value pairs, which pods consume as environment variables or mounted files, decoupling configuration from image. A Secret holds sensitive data such as passwords, tokens, and keys; it is base64-encoded and can be encrypted at rest, with tighter access controls. Both let you change configuration without rebuilding images.

Q11.How does horizontal pod autoscaling work?

The Horizontal Pod Autoscaler (HPA) automatically adjusts the number of pod replicas in a Deployment based on observed metrics such as CPU or memory utilization against a target. When load rises above the target, it adds pods; when load falls, it removes them. It relies on a metrics source (the metrics server) and operates within configured minimum and maximum replica bounds.

Q12.What is a rolling update and how do you roll back?

A rolling update gradually replaces old pods with new ones (controlled by maxSurge and maxUnavailable settings) so the application stays available during a deployment. Kubernetes creates a new ReplicaSet and shifts traffic incrementally. If something breaks, kubectl rollout undo reverts the Deployment to the previous revision, because Kubernetes keeps a history of ReplicaSets.

Q13.What is the role of etcd?

etcd is a distributed, consistent key-value store that holds the entire desired and current state of the cluster: every object's configuration and status. The API server is the only component that reads from and writes to etcd directly. Because it is the single source of truth, etcd must be backed up and made highly available; losing it means losing the cluster's state.

Q14.What is the difference between a Deployment and a StatefulSet?

A Deployment manages stateless pods that are interchangeable and can be created or destroyed in any order with random names. A StatefulSet manages stateful applications that need stable, unique network identities and stable persistent storage, with ordered, predictable pod names and ordered startup and scaling. Use StatefulSets for databases and clustered systems; Deployments for stateless web services.

Q15.What is a DaemonSet?

A DaemonSet ensures that a copy of a specific pod runs on every node (or every node matching a selector) in the cluster, and it automatically adds the pod to new nodes as they join. It is used for node-level agents such as log collectors, monitoring agents, and network plugins that must run everywhere. As nodes are removed, their DaemonSet pods are garbage collected.

Q16.What is an Ingress?

An Ingress is an API object that manages external HTTP and HTTPS access to Services in a cluster, providing host- and path-based routing, TLS termination, and a single entry point. It requires an Ingress controller (such as NGINX) running in the cluster to fulfill the rules. Ingress is more flexible and cost-efficient than exposing each Service with its own LoadBalancer.

Free AI mock interview

Practise Kubernetes out loud

Reading answers is step one. Rehearse them in OnJob's free AI mock interview, get instant feedback, then apply to AI-matched jobs in one click.

Create my free profile — free