Interview questions › Kubernetes, Docker, Helm & Podman

Kubernetes, Docker, Helm & Podman interview questions & answers

100 Kubernetes, Docker, Helm & Podman interview questions, from basic to advanced. Each links to a full answer page with a concise spoken answer, a technical explanation, and a hands-on example.

Tip: paste the job description + your resume into our free resume checker to see which of these skills the role actually requires.

Basic questions

  1. What is Kubernetes, and what problem does it solve over running containers manually?
    Kubernetes is a container orchestration platform.
  2. Explain the Kubernetes control plane components (API server, etcd, scheduler, controller manager).
    The control plane is the brain of Kubernetes.
  3. What runs on a worker node (kubelet, kube-proxy, container runtime)?
    A worker node runs kubelet, a container runtime such as containerd or CRI-O, kube-proxy or an equivalent data-plane implementation, and node-level agents like CNI,…
  4. What is a Pod, and why does Kubernetes schedule Pods rather than containers?
    A Pod is the smallest deployable unit in Kubernetes.
  5. What is the difference between a Pod, a ReplicaSet, and a Deployment?
    A Pod is an instance of one or more containers.
  6. How does a Deployment perform a rolling update, and how do maxSurge and maxUnavailable work?
    A Deployment rolling update creates a new ReplicaSet and gradually shifts replicas from the old ReplicaSet to the new one.
  7. How do you roll back a Deployment, and how does Kubernetes track revisions?
    I roll back a Deployment with kubectl rollout undo, optionally targeting a revision.
  8. What is a Service, and what are the types (ClusterIP, NodePort, LoadBalancer, ExternalName)?
    A Service gives Pods a stable virtual endpoint and load-balances to matching endpoints.
  9. How does a Service select its Pods, and what happens if labels do not match?
    A Service selects Pods using labels.
  10. What is an Ingress, and how does it differ from a LoadBalancer Service?
    Ingress is Layer 7 HTTP/HTTPS routing managed by an ingress controller.
  11. What is the difference between a liveness, readiness, and startup probe?
    A liveness probe answers whether the container should be restarted, a readiness probe answers whether it should receive traffic, and a startup probe gives…
  12. What happens when a liveness probe fails versus when a readiness probe fails?
    When liveness fails, kubelet restarts the container.
  13. What are resource requests and limits, and what happens when a container exceeds each?
    Requests are the resources Kubernetes uses for scheduling and capacity guarantees.
  14. What is the difference between a request and a limit for CPU versus memory?
    CPU requests influence scheduling and CPU shares, while CPU limits cause throttling.
  15. What is OOMKilled, and how do you diagnose and prevent it?
    OOMKilled means the kernel killed the container because it exceeded its memory cgroup limit or the node was under memory pressure.
  16. What is a ConfigMap, and how do you consume it in a Pod?
    A ConfigMap stores non-sensitive configuration such as files, environment variables, command arguments, or app settings.
  17. What is a Secret, and how is it different from a ConfigMap (and is it actually encrypted)?
    A Secret is meant for sensitive values, while a ConfigMap is for non-sensitive config.
  18. How do you encrypt Kubernetes Secrets at rest?
    To encrypt Kubernetes Secrets at rest, configure API server encryption using an EncryptionConfiguration or managed KMS integration.
  19. What is a namespace, and how do you use it for isolation and quotas?
    A namespace is a logical scope for names, RBAC, quotas, policies, and operational ownership.
  20. What is a ResourceQuota and a LimitRange?
    ResourceQuota caps aggregate resource usage in a namespace, such as CPU, memory, PVCs, Services, or object counts.
  21. What is the difference between a StatefulSet and a Deployment?
    A StatefulSet is for stateful workloads that need stable network identity, ordered rollout, and stable per-Pod storage.
  22. When would you use a DaemonSet, and give a real example.
    I use a DaemonSet when I need one Pod on every node or every matching node.
  23. What is a Job versus a CronJob?
    A Job runs a finite task to completion, such as a migration or batch import.
  24. What is a HorizontalPodAutoscaler, and what metrics can it scale on?
    The HorizontalPodAutoscaler changes replica count based on observed demand.
  25. What is the difference between the HPA, VPA, and Cluster Autoscaler?
    HPA scales Pod replicas, VPA adjusts resource requests for Pods, and Cluster Autoscaler changes node count.
  26. How does the Cluster Autoscaler decide to add or remove nodes?
    Cluster Autoscaler adds nodes when Pods are unschedulable because no existing node can fit them, and it removes nodes when they are underutilized and their Pods can…
  27. What is a PersistentVolume, a PersistentVolumeClaim, and a StorageClass?
    A PersistentVolume is a cluster storage resource, a PersistentVolumeClaim is a user's request for storage, and a StorageClass defines how storage should be…
  28. What is dynamic volume provisioning, and how does a StorageClass enable it?
    Dynamic volume provisioning means Kubernetes creates a backing volume automatically when a PVC references a StorageClass.
  29. What is the difference between a volume, a PersistentVolume, and an emptyDir?
    A volume is any storage source mounted into a Pod.
  30. How does Kubernetes DNS work for service discovery?
    Kubernetes DNS is usually provided by CoreDNS.
  31. Explain the Kubernetes networking model and the requirement that all Pods can reach each other.
    The Kubernetes networking model expects every Pod to have an IP and for Pods to reach other Pods without NAT, even across nodes.
  32. What is a CNI plugin, and name a few (Calico, Cilium, AWS VPC CNI)?
    A CNI plugin implements Pod networking: IP allocation, interface setup, routing, and often NetworkPolicy enforcement.
  33. What is kube-proxy, and how does it implement Service routing (iptables vs IPVS)?
    kube-proxy watches Services and EndpointSlices and programs node-level forwarding rules.

Intermediate questions

  1. What is a NetworkPolicy, and what is the default Pod-to-Pod behaviour without one?
    NetworkPolicy defines allowed ingress and egress for selected Pods.
  2. What is RBAC, and what are Roles, ClusterRoles, RoleBindings, and ClusterRoleBindings?
    RBAC controls who can perform which verbs on which Kubernetes resources.
  3. What is a ServiceAccount, and how do Pods use it to talk to the API server?
    A ServiceAccount is the Kubernetes identity assigned to a Pod.
  4. How does the scheduler decide where to place a Pod?
    The scheduler places a Pod by filtering nodes that cannot run it and scoring nodes that can.
  5. What are node selectors, node affinity, and anti-affinity?
    nodeSelector is a simple label match.
  6. What are taints and tolerations, and how do they differ from affinity?
    Taints repel Pods from nodes unless the Pods tolerate them.
  7. What are Pod topology spread constraints, and why use them?
    Pod topology spread constraints tell the scheduler to distribute Pods across topology domains such as zones, nodes, or racks.
  8. What is a static Pod, and how does it differ from a normally scheduled Pod?
    A static Pod is defined directly on a node, usually in the kubelet manifest path, and kubelet manages it without the scheduler.
  9. What are init containers, and when would you use one?
    Init containers run before application containers and must complete successfully before the app starts.
  10. What is a sidecar container, and give a common use case?
    A sidecar container runs alongside the main container in the same Pod and shares networking and volumes.
  11. What is etcd, and why is it critical to back it up?
    etcd is the strongly consistent key-value store backing Kubernetes cluster state.
  12. How would you back up and restore an etcd cluster?
    For etcd backup, I take a snapshot with etcdctl or the managed provider mechanism, store it securely, and regularly test restore in a non-production cluster.
  13. What is a CRD (Custom Resource Definition), and what is an Operator?
    A CRD extends the Kubernetes API with a custom resource type.
  14. What is the controller/reconciliation loop pattern in Kubernetes?
    The reconciliation loop is the core Kubernetes controller pattern: observe current state, compare it with desired state, take one safe action, and repeat until the…
  15. How do you troubleshoot a Pod stuck in Pending?
    A Pod stuck in Pending usually means it cannot be scheduled or bound to required resources.
  16. How do you troubleshoot a Pod in CrashLoopBackOff?
    CrashLoopBackOff means a container starts, exits, and kubelet backs off before restarting it again.
  17. How do you troubleshoot an ImagePullBackOff error?
    ImagePullBackOff means the node cannot pull the image.
  18. What does kubectl describe show that kubectl get does not?
    kubectl get gives a compact current view.
  19. How do you view logs from a crashed (previous) container instance?
    I view logs from the previous crashed container with kubectl logs POD -c CONTAINER --previous.
  20. What is a PodDisruptionBudget, and how does it protect availability during maintenance?
    A PodDisruptionBudget limits voluntary disruptions by specifying minAvailable or maxUnavailable.
  21. What is graceful termination, and how do preStop hooks and terminationGracePeriodSeconds work?
    Graceful termination starts when Kubernetes sends SIGTERM to the container, optionally runs a preStop hook, waits for terminationGracePeriodSeconds, and then sends…
  22. How do you safely drain and cordon a node for maintenance?
    To maintain a node safely, I cordon it first, drain it while respecting DaemonSets and PDBs, perform the maintenance, verify node health, and then uncordon it.
  23. What is the difference between cordon, drain, and delete on a node?
    cordon marks a node unschedulable, drain evicts movable Pods from the node, and delete removes the Node object from the API.
  24. What are Kubernetes QoS classes (Guaranteed, Burstable, BestEffort)?
    Kubernetes QoS classes are Guaranteed, Burstable, and BestEffort.
  25. How does Kubernetes handle a node that becomes NotReady?
    When a node becomes NotReady, Kubernetes stops treating it as healthy, stops routing to affected endpoints as conditions update, and eventually evicts Pods after…
  26. What is the difference between horizontal scaling of Pods and scaling nodes?
    Horizontal Pod scaling increases or decreases application replicas.
  27. How do you expose a service externally on EKS, and what gets created?
    On EKS, I can expose a service externally with a LoadBalancer Service or an Ingress.
  28. What is a container, and how is it different from a virtual machine?
    A container packages a process with its filesystem and runtime isolation using kernel primitives.
  29. What is a container image, and what are layers?
    A container image is an immutable template made of layers plus metadata.
  30. How does Docker layer caching work, and how do you order a Dockerfile to exploit it?
    Docker caches each build step as a layer.
  31. What is the difference between an image and a container?
    An image is the packaged artifact, and a container is a running or stopped instance created from that image.
  32. What is the difference between CMD and ENTRYPOINT in a Dockerfile?
    ENTRYPOINT defines the main executable for the container, while CMD provides default arguments or a default command.
  33. What is the difference between COPY and ADD?
    COPY copies files from the build context into the image.

Advanced questions

  1. What is a multi-stage build, and why does it reduce image size and risk?
    A multi-stage build uses one stage to compile or package the application and a later runtime stage to contain only what is needed to run it.
  2. Why should containers run as a non-root user, and how do you enforce it?
    Containers should run as non-root so a process compromise has less privilege inside the container and less chance of dangerous host interaction.
  3. What is a distroless or scratch image, and what are the trade-offs?
    scratch and distroless images are minimal runtime images with little or no OS userland.
  4. What is the difference between EXPOSE and publishing a port with -p?
    EXPOSE is image metadata documenting the port the application listens on.
  5. What is a Docker volume versus a bind mount?
    A Docker volume is managed by the container engine and survives container replacement.
  6. How do you reduce the size of a Docker image?
    I reduce image size with multi-stage builds, slim or distroless bases,.dockerignore, dependency pruning, cache cleanup in the same layer, and by avoiding unnecessary…
  7. What is a.dockerignore file, and why does it matter?
    .dockerignore controls which files are excluded from the build context.
  8. What is the difference between the build context and the image?
    The build context is the set of local files sent to the builder and available to COPY or ADD.
  9. What is the role of the ENTRYPOINT exec form versus shell form regarding signals?
    Exec form ENTRYPOINT runs the process directly, so it receives signals properly as PID 1.
  10. How do you debug a container that exits immediately on start?
    To debug a container that exits immediately, I inspect logs, exit code, command, environment, image architecture, missing files, and permissions.
  11. What is a container registry, and how does image tagging and digests work?
    A registry stores and distributes container images.
  12. Why is using the latest tag in production discouraged?
    Using latest in production is discouraged because it is mutable and non-auditable.
  13. What is the difference between Docker and containerd?
    Docker is a full developer-facing container platform with CLI, API, build, networking, and image management.
  14. What is Podman, and how does it differ architecturally from Docker (daemonless, rootless)?
    Podman is an OCI-compatible container engine that is daemonless and supports rootless operation by design.
  15. What are the security advantages of Podman's rootless and daemonless design?
    Podman's rootless and daemonless design reduces the blast radius of a compromised container or client because there is no central root daemon socket equivalent to attack.
  16. What is a Podman pod, and how does it relate to the Kubernetes Pod concept?
    A Podman pod groups containers that share namespaces, especially the network namespace, similar to a Kubernetes Pod.
  17. How do you generate Kubernetes YAML from Podman (podman generate kube)?
    podman generate kube can export Kubernetes YAML for a Podman container, pod, or volume.
  18. Is the Podman CLI compatible with Docker commands, and what aliasing is possible?
    The Podman CLI is intentionally similar to Docker for common container commands, and many teams alias docker=podman for local workflows.
  19. What is Helm, and what problem does it solve over raw manifests?
    Helm is a Kubernetes package manager and templating tool.
  20. What are the parts of a Helm chart (Chart.yaml, values.yaml, templates, _helpers.tpl)?
    A Helm chart contains Chart.yaml for metadata, values.yaml for defaults, templates for Kubernetes manifests, and helper templates such as _helpers.tpl for reusable…
  21. How does Helm templating work, and how do values get injected?
    Helm uses Go templates to render Kubernetes YAML.
  22. What is the difference between helm install, helm upgrade, and helm rollback?
    helm install creates a new release, helm upgrade modifies an existing release using a new chart or values, and helm rollback returns a release to a previous revision.
  23. How does Helm track releases and revisions?
    Helm tracks releases and revisions by storing release metadata in the cluster, usually as Secrets in the target namespace.
  24. What is the difference between helm template and helm install?
    helm template renders manifests locally and does not create a release in the cluster.
  25. How do you manage environment-specific values across dev, staging, and prod with Helm?
    I manage environment-specific Helm values with a common base values file plus environment overlays such as dev, staging, and prod.
  26. What are Helm hooks, and when would you use them?
    Helm hooks run chart-defined Kubernetes resources at specific lifecycle points such as pre-install, post-install, pre-upgrade, or pre-delete.
  27. What is a Helm subchart and chart dependency, and how is it managed?
    A subchart is a dependent chart packaged or pulled with a parent chart.
  28. How do you secure secrets in Helm (e.g., with helm-secrets or external stores)?
    I do not put plaintext secrets directly in values files.
  29. How does Helm compare to Kustomize, and when would you choose each?
    Helm is best when I need packaging, parameters, dependencies, and release lifecycle.
  30. How would you validate and lint a Helm chart in CI?
    I validate a Helm chart in CI with helm lint, helm template, schema validation, kubeconform or kubeval, unit tests where useful, policy checks, and a dry-run against…
  31. How do you debug a failed Helm upgrade and a release stuck in pending-upgrade?
    For a failed Helm upgrade or pending-upgrade release, I check helm status, helm history, rendered manifests, Kubernetes events, and the release Secret.
  32. How would you design a chart to be reusable across multiple services?
    A reusable chart should expose stable values for image, probes, resources, service, ingress, autoscaling, security context, annotations, and environment, while hiding…
  33. What recent Kubernetes feature have you used, and what value did it bring?
    In an interview, I would choose a feature I genuinely used and explain the operational value.
  34. How would you harden a Kubernetes cluster (Pod Security Standards, RBAC, network policies, image policy)?
    I harden a Kubernetes cluster in layers: identity and RBAC, namespace isolation, Pod Security Standards, NetworkPolicies, image provenance, secrets encryption,…

← All interview topics