Tech

Kubernetes

Kubernetes (K8s) is the industry-standard platform for automating the deployment, scaling, and management of containerized applications. It abstracts away infrastructure complexity, letting teams run workloads reliably at scale. Interview questions cover Pods, Deployments, Services, Ingress, ConfigMaps, resource limits, health checks, and how Kubernetes handles failures — all essential knowledge for DevOps and platform engineering roles.

What you get

Questions

20

Difficulty

3 levels

Answer Formats

2

Use the toggle on each card to move between an interview-ready answer and a simpler explanation. Questions are sorted from beginner to advanced, and the keywords are highlighted. You can also blur the answers to practice recalling them from memory.

Questions

Practice the answers out loud.

All topics

Question 1

What is Kubernetes?

Beginner

How to answer in an interview

Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications across a cluster of machines. It handles tasks like scheduling containers, self-healing failed instances, load balancing, and rolling updates, abstracting away much of the operational complexity of running containers at scale.

Question 2

What is a pod in Kubernetes?

Beginner

How to answer in an interview

A pod is the smallest deployable unit in Kubernetes, representing one or more tightly coupled containers that share the same network namespace and storage volumes. Containers within the same pod can communicate via localhost and are always scheduled together on the same node.

Question 3

What is the difference between a pod and a container?

Beginner

How to answer in an interview

A container is a single running instance of an application packaged with its dependencies. A pod is a Kubernetes abstraction that wraps one or more containers, providing them a shared network and storage context, and it's the actual unit Kubernetes schedules and manages, rather than individual containers directly.

Question 4

What is a namespace in Kubernetes?

Beginner

How to answer in an interview

A namespace is a way to logically partition a Kubernetes cluster into multiple virtual clusters, allowing resource isolation between different teams, projects, or environments within the same physical cluster, along with the ability to set resource quotas per namespace.

Question 5

What is kubectl?

Beginner

How to answer in an interview

kubectl is the command-line tool used to interact with a Kubernetes cluster, allowing users to deploy applications, inspect and manage cluster resources, view logs, and troubleshoot issues by communicating with the cluster's API server.

Question 6

Explain the Kubernetes architecture: control plane and nodes.

Intermediate

How to answer in an interview

The control plane manages the overall cluster state and includes components like the API server, which handles all requests; etcd, a key-value store holding cluster state; the scheduler, which assigns pods to nodes; and the controller manager, which ensures the actual state matches the desired state. Worker nodes run the actual application workloads via the kubelet agent and container runtime, communicating with the control plane.

Question 7

What is a Deployment in Kubernetes?

Intermediate

How to answer in an interview

A Deployment is a Kubernetes object that manages a set of identical pods, ensuring a specified number of replicas are running at all times, and it manages rolling updates and rollbacks to safely update application versions without downtime. It automatically creates and manages an underlying ReplicaSet.

Question 8

What is a Service in Kubernetes?

Intermediate

How to answer in an interview

A Service provides a stable network endpoint and DNS name for a set of pods, load balancing traffic across them even as individual pods are created, destroyed, or rescheduled with changing IP addresses. It uses label selectors to determine which pods it routes traffic to.

Question 9

Explain ConfigMaps and Secrets in Kubernetes.

Intermediate

How to answer in an interview

A ConfigMap stores non-sensitive configuration data, like environment variables or config files, separately from application code, so configuration can change without rebuilding container images. A Secret is similar but designed for sensitive data like passwords or API keys, stored in a base64-encoded format with additional access controls.

Question 10

What is a ReplicaSet?

Intermediate

How to answer in an interview

A ReplicaSet ensures a specified number of identical pod replicas are running at any given time, automatically creating new pods to replace any that fail or are deleted. In practice, ReplicaSets are usually managed indirectly through Deployments rather than created directly.

Question 11

Explain rolling updates and rollbacks in Kubernetes.

Intermediate

How to answer in an interview

A rolling update gradually replaces old pod versions with new ones, a few at a time, ensuring the application remains available throughout the update with zero downtime. If issues are detected, Kubernetes allows an easy rollback to the previous stable version using the deployment's revision history.

Question 12

Explain liveness and readiness probes.

Intermediate

How to answer in an interview

A liveness probe checks whether a container is still running correctly, and if it fails, Kubernetes restarts the container. A readiness probe checks whether a container is ready to accept traffic, and if it fails, Kubernetes temporarily removes the pod from a service's load balancing pool without restarting it.

Question 13

What is an Ingress in Kubernetes?

Intermediate

How to answer in an interview

An Ingress manages external HTTP and HTTPS access to services within a cluster, providing features like path-based and host-based routing, SSL termination, and load balancing, all managed through a single entry point rather than exposing each service individually. It requires an Ingress controller running in the cluster to actually implement the routing rules.

Question 14

Explain the concept of self-healing in Kubernetes.

Intermediate

How to answer in an interview

Self-healing refers to Kubernetes' ability to automatically detect and recover from failures, such as restarting containers that crash, rescheduling pods from failed nodes onto healthy ones, and replacing pods that fail health checks, continuously reconciling the actual cluster state with the declared desired state.

Question 15

Explain the difference between ClusterIP, NodePort, and LoadBalancer service types.

Advanced

How to answer in an interview

ClusterIP, the default type, exposes a service only internally within the cluster. NodePort exposes the service on a static port on each node's IP, making it reachable from outside the cluster. LoadBalancer provisions an external load balancer, typically through a cloud provider, giving the service a single external IP that distributes traffic into the cluster.

Question 16

Explain horizontal pod autoscaling.

Advanced

How to answer in an interview

Horizontal Pod Autoscaling (HPA) automatically adjusts the number of pod replicas in a Deployment based on observed metrics, such as CPU or memory utilization, or custom metrics, scaling out during high demand and scaling back in during low demand to optimize resource usage and cost.

Question 17

What is a StatefulSet and how does it differ from a Deployment?

Advanced

How to answer in an interview

A StatefulSet manages pods that require stable, unique network identities and persistent storage that survives rescheduling, such as databases, and it deploys and scales pods in a defined, ordered sequence. A Deployment, in contrast, treats pods as interchangeable and doesn't guarantee ordering or stable identity, making it suitable for stateless applications.

Question 18

What is a DaemonSet?

Advanced

How to answer in an interview

A DaemonSet ensures that a copy of a specific pod runs on every node, or a selected subset of nodes, in the cluster, commonly used for cluster-wide services like log collectors, monitoring agents, or network plugins that need to run on each node.

Question 19

Explain persistent volumes and persistent volume claims.

Advanced

How to answer in an interview

A PersistentVolume (PV) represents a piece of actual storage provisioned in the cluster, independent of any pod's lifecycle. A PersistentVolumeClaim (PVC) is a request for storage made by a user or application, which Kubernetes binds to a matching available PV, abstracting away the underlying storage details from the application.

Question 20

What is etcd's role in Kubernetes?

Advanced

How to answer in an interview

etcd is a distributed, consistent key-value store that serves as Kubernetes' primary data store, holding the entire cluster's configuration and state, including information about nodes, pods, and other resources. All control plane components read from and write to etcd, making its availability and consistency critical to the cluster's reliability.

More in Tech

Keep browsing related topics.

Browse all