Skip to content

Kubernetes Engineer interview questions

100 real questions with model answers and explanations for Junior candidates.

See a Kubernetes Engineer resume example

Practice with flashcards

Spaced repetition · Hunter Pass

Questions

kubernetes

Kubernetes is a platform that manages containerized workloads by keeping declared application state running across a cluster.

  • It schedules workloads onto available nodes instead of requiring manual placement.
  • Controllers replace failed instances and reconcile actual state with desired state.
  • Services provide stable access while Pods can be created and removed.
  • Kubernetes supplies orchestration primitives, but application code and container images still remain the user's responsibility.

Why interviewers ask this: The interviewer checks whether the candidate understands Kubernetes as a declarative container orchestration system rather than a container runtime.

kubernetescluster

A Kubernetes cluster is a group of control-plane and worker-node components that run and manage workloads together.

  • The control plane stores desired state and makes cluster-wide decisions.
  • Worker nodes provide CPU, memory, networking, and storage for Pods.
  • Components communicate through the Kubernetes API rather than sharing one process.
  • A cluster can contain one or many nodes depending on its purpose and availability needs.

Why interviewers ask this: A strong answer identifies the control plane, worker nodes, and API-based coordination as the basic cluster structure.

containers

Containers isolate processes while sharing the host kernel, whereas virtual machines include a guest operating system on virtualized hardware.

  • Container images package an application and its user-space dependencies without a separate kernel.
  • Virtual machines generally provide a stronger isolation boundary but consume more resources and start more slowly.
  • Multiple containers can run on one node through a container runtime.
  • Kubernetes schedules containers inside Pods and does not replace the underlying node operating system.

Why interviewers ask this: The interviewer evaluates whether the candidate understands the isolation and resource model that Kubernetes builds upon.

workloadskubernetes

A Pod is the smallest deployable Kubernetes workload unit and contains one or more tightly coupled containers.

  • Containers in a Pod are scheduled together onto the same node.
  • They share the Pod network namespace, IP address, and localhost.
  • They can share volumes declared in the Pod specification.
  • Pods are disposable, so higher-level controllers usually create and replace them.

Why interviewers ask this: The interviewer checks whether the candidate knows the Pod as the scheduling and shared-resource boundary.

containersworkloads

A Pod can group containers that must share lifecycle, networking, and storage as one application unit.

  • The main container may run the application while a helper provides a closely related supporting function.
  • Containers communicate over localhost because they share one network namespace.
  • Shared volumes allow one container to produce files that another consumes.
  • Unrelated services should usually use separate Pods so they can scale and update independently.

Why interviewers ask this: A strong answer explains multi-container Pods through tight coupling and recognizes when separate Pods are more appropriate.

workloads

Each Pod normally receives its own cluster IP address that is shared by all containers in that Pod.

  • Containers inside the Pod use localhost and different ports to communicate with one another.
  • Other Pods address it through the Pod IP when cluster networking permits.
  • The Pod IP is not stable across replacement, so clients should normally use a Service.
  • The Kubernetes network model expects Pod IPs to be routable across nodes without application-level port mapping.

Why interviewers ask this: The interviewer checks basic understanding of Pod-level networking and why stable service discovery is separate.

workloadskubernetes

A Pod phase is a high-level summary of where the Pod is in its lifecycle: Pending, Running, Succeeded, Failed, or Unknown.

  • Pending means Kubernetes accepted the Pod but one or more containers are not ready to run yet.
  • Running means the Pod is bound to a node and at least one container is running, starting, or restarting.
  • Succeeded and Failed mean all containers terminated, with success or at least one failure respectively.
  • Phase is broader than container state and should not be confused with the Ready condition.

Why interviewers ask this: The interviewer evaluates whether the candidate distinguishes Pod lifecycle phase from container state and readiness.

workloads

restartPolicy tells the kubelet when to restart terminated application containers in the same Pod.

  • Always restarts a terminated container regardless of its exit result.
  • OnFailure restarts only containers that exit unsuccessfully.
  • Never leaves a terminated container stopped.
  • The policy applies to application containers in the Pod and does not recreate the Pod on another node.

Why interviewers ask this: A strong answer explains container restart behavior and does not confuse it with controller-driven Pod replacement.

containers

An init container runs to completion before the Pod's regular application containers start.

  • Multiple init containers run sequentially in the order listed.
  • Each must succeed before Kubernetes starts the next init container or an application container.
  • Init containers can use separate images, commands, security settings, and shared volumes.
  • They suit prerequisite setup without placing that setup logic in the main application image.

Why interviewers ask this: The interviewer checks whether the candidate understands init ordering and separation from long-running application containers.

containers

A sidecar is a supporting container that runs alongside the main application container in the same Pod.

  • It shares the Pod's network and can share declared volumes with the application.
  • Common roles include proxying, telemetry collection, or adapting files for the main process.
  • The sidecar is tightly coupled to the Pod lifecycle rather than deployed and scaled as an independent service.
  • Adding a sidecar increases the Pod's resource use and operational surface, so the coupling should be intentional.

Why interviewers ask this: A strong answer defines the sidecar through shared lifecycle and resources rather than through one specific tool.

workloadskubernetesdeployment

A Deployment declaratively manages a set of replicated application Pods and their updates.

  • Its Pod template describes the containers and metadata used for new Pods.
  • The replicas field states how many matching Pods should exist.
  • The Deployment creates and manages ReplicaSets rather than owning Pods directly.
  • It is intended for stateless workloads whose Pods can be replaced from the same template.

Why interviewers ask this: The interviewer checks whether the candidate understands the Deployment as a higher-level controller for replicated Pods.

replicationworkloads

A ReplicaSet is a controller that keeps a specified number of matching Pod replicas running.

  • It uses a label selector to identify the Pods it manages.
  • If too few matching Pods exist, it creates more from its Pod template.
  • If too many matching Pods exist, it removes extras.
  • Users normally manage ReplicaSets through Deployments, which add update and revision behavior.

Why interviewers ask this: A strong answer explains the reconciliation role of a ReplicaSet and its relationship to a Deployment.

workloadsreplicationdeployment

A Deployment manages ReplicaSets, and each ReplicaSet maintains Pods created from one template revision.

  • Changing the Deployment Pod template causes it to create a new ReplicaSet.
  • The new and old ReplicaSets adjust replica counts according to the update strategy.
  • Pods receive owner references that connect them to their ReplicaSet.
  • This layered ownership lets Kubernetes preserve desired replica count while replacing a workload version.

Why interviewers ask this: The interviewer evaluates whether the candidate understands the controller hierarchy behind a common application workload.

replicationdeploymentworkloads

The replicas field declares the desired number of available Pod instances for the Deployment's workload.

  • The Deployment and its ReplicaSet continually compare desired and observed counts.
  • A missing Pod is replaced so the count can return to the declared value.
  • Multiple replicas can spread application traffic across separate Pod instances.
  • Replicas duplicate the Pod template but do not automatically partition application data.

Why interviewers ask this: The interviewer checks understanding of desired replica count and avoids confusing replication with data sharding.

reactkubernetes

Reconciliation is the repeated process of moving actual cluster state toward the desired state stored in the API.

  • A controller watches resources relevant to the state it manages.
  • It compares the declared specification with current objects or conditions.
  • It creates, updates, or removes resources when the two states differ.
  • The loop repeats, so Kubernetes can correct later drift rather than run a one-time script.

Why interviewers ask this: A strong answer identifies the control-loop model that underlies Deployments, ReplicaSets, and other Kubernetes resources.

kubernetes

Labels are key-value metadata attached to objects for identifying and grouping them.

  • They can describe properties such as application, component, environment, or version.
  • Selectors use labels to find sets of objects without relying on object names.
  • Services and workload controllers depend on accurate labels to connect related resources.
  • Labels are intended for identifying data, while larger descriptive text belongs in annotations.

Why interviewers ask this: The interviewer checks whether the candidate understands labels as operational identity used by selectors.

A label selector is a query that matches Kubernetes objects by their labels.

  • Equality selectors match expressions such as app=web or tier!=frontend.
  • Set-based selectors express membership with operators such as In, NotIn, and Exists.
  • A Service selector determines which Pods become its backends.
  • A controller selector must match the labels in its Pod template so it can manage the intended Pods.

Why interviewers ask this: A strong answer explains selector forms and their concrete role in connecting controllers and Services to Pods.

kubernetes

Annotations store non-identifying metadata, while labels are designed for selecting and grouping objects.

  • Annotations may contain tool configuration, ownership links, checksums, or descriptive details.
  • Selectors cannot query annotations.
  • Annotation values can hold larger and less structured text than label values.
  • Metadata used to decide membership in a Service or controller belongs in labels, not annotations.

Why interviewers ask this: The interviewer evaluates whether the candidate can choose the correct metadata mechanism for selection and descriptive information.

namespaceskubernetes

A Namespace creates a logical scope for many namespaced resources inside one cluster.

  • Pods, Deployments, Services, ConfigMaps, and Secrets commonly belong to a Namespace.
  • The same resource name can exist in different Namespaces.
  • RBAC rules, quotas, and policies can be applied by Namespace.
  • Namespaces organize and scope resources but are not automatically a complete security boundary.

Why interviewers ask this: A strong answer covers naming and policy scope without overstating Namespace isolation.

namespaceskubernetescluster

Namespaced resources belong to one Namespace, while cluster-scoped resources exist for the whole cluster.

  • Pods, Deployments, Services, ConfigMaps, Secrets, and PersistentVolumeClaims are namespaced.
  • Nodes, Namespaces, PersistentVolumes, and many cluster-level RBAC objects are cluster-scoped.
  • A namespaced resource name must be unique only inside its Namespace.
  • kubectl uses the selected Namespace for namespaced resources but does not add one to cluster-scoped resources.

Why interviewers ask this: The interviewer checks whether the candidate understands resource scope and its effect on naming and kubectl commands.

Locked questions

  • 21

    What is a Service in Kubernetes?

    kubernetes
  • 22

    What is a ClusterIP Service?

    cluster
  • 23

    What is a NodePort Service?

  • 24

    What is a LoadBalancer Service?

  • 25

    How do ClusterIP, NodePort, and LoadBalancer Services differ?

    cluster
  • 26

    What is a headless Service?

  • 27

    How does Kubernetes DNS support Service discovery?

    dnskubernetes
  • 28

    What is the Kubernetes control plane?

    control-planekubernetes
  • 29

    What does kube-apiserver do?

  • 30

    What is etcd used for in Kubernetes?

    control-planekubernetes
  • 31

    What does kube-scheduler do?

    scheduling
  • 32

    What does kube-controller-manager do?

  • 33

    What is a Kubernetes Node?

    kubernetes
  • 34

    What does kubelet do on a worker node?

    control-plane
  • 35

    What role does kube-proxy play in Kubernetes networking?

    proxykubernetes
  • 36

    What is a container runtime in Kubernetes?

    kubernetescontainers
  • 37

    What is a Kubernetes YAML manifest?

    kubernetesyaml
  • 38

    What do apiVersion, kind, metadata, spec, and status mean in a Kubernetes object?

    kubernetes
  • 39

    What are kubectl get, describe, and logs used for?

    kuberneteskubectl
  • 40

    What is the difference between kubectl create and kubectl apply?

    kuberneteskubectl
  • 41

    What are kubectl contexts and Namespaces used for?

    kuberneteskubectlnamespaces
  • 42

    What is a ConfigMap?

    configkubernetesconfiguration
  • 43

    What is a Kubernetes Secret?

    configurationkubernetessecrets
  • 44

    How can a Pod consume values from a ConfigMap or Secret?

    workloadsconfigurationconfig
  • 45

    What is a volume in a Kubernetes Pod?

    workloadskubernetes
  • 46

    What is an emptyDir volume?

  • 47

    What are PersistentVolume and PersistentVolumeClaim?

  • 48

    What are container resource requests and limits?

    containers
  • 49

    How do liveness, readiness, and startup probes differ?

    health-checks
  • 50

    What happens during normal Pod termination?

    workloads
  • 51

    How would you deploy a stateless containerized application to Kubernetes?

    kubernetescontainersdeployment
  • 52

    What would you check before applying a new Kubernetes manifest?

    kubernetes
  • 53

    You applied a Deployment but cannot find its Pods; how would you investigate?

    workloadsdeployment
  • 54

    A ConfigMap changed but existing Pods still use old configuration; what would you do?

    configkubernetesconfiguration
  • 55

    How would you install an application from a Helm chart with environment-specific settings?

    helm
  • 56

    How would you use a Kustomize overlay to deploy the same application to staging and production?

    deploymentkuberneteskustomize
  • 57

    Argo CD reports an application as OutOfSync; how would you approach it?

    gitops
  • 58

    What is your first-pass workflow when a Pod is unhealthy?

    workloads
  • 59

    A Pod is in CrashLoopBackOff; how would you debug it?

    workloadstroubleshooting
  • 60

    A container exits immediately with code 1 and no useful application logs; what would you inspect next?

    containers
  • 61

    A Pod restarts because its liveness probe fails; how would you correct it?

    workloadshealth-checks
  • 62

    How would you troubleshoot ImagePullBackOff for a public image?

  • 63

    A private registry image fails with unauthorized errors; what would you check?

    registries
  • 64

    A Pod stays Pending; how would you find the reason?

    workloads
  • 65

    A Pod is Pending because no node has enough CPU for its request; what would you do?

    workloads
  • 66

    A Pod is Pending with an unbound PersistentVolumeClaim; how would you investigate?

    workloads
  • 67

    A container was terminated as OOMKilled; how would you respond?

    containers
  • 68

    A container is slow and its CPU usage sits at the limit; what would you check?

    containers
  • 69

    A Pod is Running but never becomes Ready; how would you troubleshoot it?

    workloads
  • 70

    Pods are Ready but the Service has no endpoints; what would you inspect?

    endpoints
  • 71

    How would you retrieve the right logs from a Pod with multiple containers and restarts?

    containersworkloads
  • 72

    When kubectl logs is not enough, what would you look for in kubectl describe?

    kuberneteskubectl
  • 73

    A minimal container has no shell, but you need to inspect its network namespace; what would you do?

    containerskubernetesnamespaces
  • 74

    How would you confirm what configuration Kubernetes actually applied to a Deployment?

    kubernetesdeploymentconfig
  • 75

    How would you use Kubernetes events during troubleshooting?

    kubernetes
  • 76

    A Service name resolves but connections are refused; how would you narrow the problem?

  • 77

    How would you make an internal application reachable by other workloads in the cluster?

    cluster
  • 78

    How would you expose an HTTP application outside the cluster?

    clusterhttp
  • 79

    Traffic reaches a Service on the wrong application port; what would you correct?

  • 80

    A Pod cannot resolve a Service name; how would you investigate DNS?

    dnsworkloads
  • 81

    A connection stopped working after a Cilium network policy was applied; how would you debug it?

    network-policiesnetworking
  • 82

    How would you manually scale a Deployment and verify the result?

    workloadsdeployment
  • 83

    What would you prepare before enabling a CPU-based HorizontalPodAutoscaler?

    scaling
  • 84

    You scaled a Deployment with kubectl, but Argo CD changed it back; what should you do?

    deploymentkubernetesgitops
  • 85

    How would you monitor a Deployment rolling update?

    deploymentmonitoringworkloads
  • 86

    How would you choose maxSurge and maxUnavailable for a basic rolling update?

    deployment-strategies
  • 87

    A new image causes a failed rolling update; how would you recover?

    deployment-strategies
  • 88

    How would you inspect and roll back to a specific Deployment revision?

    deploymentrollbackworkloads
  • 89

    A rollout sends traffic to Pods before they can serve requests; what would you change?

  • 90

    A Deployment rollout is stuck with old Pods still running; how would you investigate?

    problem-solvingdeploymentworkloads
  • 91

    How would you choose initial CPU and memory requests and limits for a new workload?

    memory
  • 92

    A workload's memory request is 128Mi and limit is 256Mi, but it normally uses 400Mi; what change would you make?

    memory
  • 93

    After increasing resource requests, Pods no longer schedule; how would you decide the next step?

  • 94

    Karpenter does not provision a node for a Pending Pod; what would you check?

    workloadsautoscaling
  • 95

    A Deployment is rejected by a Kyverno policy; how would you handle it?

    workloadsdeployment
  • 96

    A Pod fails because a Secret produced by External Secrets is missing; how would you investigate?

    workloadsconfigurationsecrets
  • 97

    Admission rejects an image because its signature cannot be verified; what would you do?

  • 98

    How would you combine Prometheus, Grafana, and Loki when a rollout looks unhealthy?

    monitoringlogging
  • 99

    A sidecar container is failing while the main application container is healthy; how would you assess the Pod?

    containersworkloads
  • 100

    What would you verify before declaring a Kubernetes deployment successful?

    workloadskubernetesdeployment