Cloud & DevOps7 min read10 interview questions

Kubernetes in plain words

What it manages, and the four words you need to understand it.

In one sentenceKubernetes keeps your containers running: it starts them, restarts them when they crash, and spreads them over many machines.

Think of it like thisIt is a restaurant manager who makes sure enough cooks are working, replaces anyone who falls ill, and sends each order to a free cook.

The big picture

Tap any step to see where to use it, how to use it and an example result.

The four words

A pod is one or more containers that run together. A deployment says how many pods you want and how to update them. A service gives a set of pods one steady address. A node is a machine that runs pods.

  • Pod: the running unit
  • Deployment: how many, and how to update
  • Service: one address for many pods
  • Node: the machine

You declare, it makes it so

You write a file that says "three copies of this image". Kubernetes compares that with reality and keeps fixing the difference. This idea, describing the end state, is the core of how it works.

When you need it

Kubernetes is powerful and also complicated. A small site is usually better on a simple host. Consider it when you run many services, need automatic scaling, or want the same setup across clouds.

Common mistakes

  • Using Kubernetes for a single small app.
  • Forgetting resource limits, so one pod starves the others.
  • Storing important data inside pods without a persistent volume.

Quick recap

  • Pods run containers
  • Deployments keep the right number running
  • Services give a stable address
  • You describe the end state and it keeps it true

Try it yourself

Install a small local Kubernetes such as kind or minikube and run a deployment with two copies of a web server. Delete one pod and watch it come back.

Top 10 interview questions

Ordered from basic to advanced. Try answering out loud first, then open the answer.

  1. What is Kubernetes?Basic

    An open-source system that runs and manages containers across many machines: it starts them, restarts them when they fail, scales them and routes traffic to them.

  2. What is a Pod?Basic

    The smallest unit Kubernetes runs. It holds one or more containers that share a network address and storage.

  3. What is a Deployment?Basic

    An object that says how many copies of a Pod you want and which version. It creates them, replaces them during updates and keeps the count right.

  4. What is a Service?Basic

    A stable address and name in front of a changing set of Pods. Because Pods come and go, clients talk to the Service, which sends traffic to healthy Pods.

  5. What are the main parts of the cluster?Intermediate

    The control plane (API server, scheduler, controllers and etcd, which stores the cluster state) and worker nodes, each running a kubelet that starts Pods, plus a container runtime and networking.

  6. How does a rolling update work?Intermediate

    Kubernetes starts new Pods with the new version and removes old ones gradually, waiting for the new ones to be ready, so the app stays available. A failed rollout can be undone with kubectl rollout undo.

  7. What are liveness and readiness probes?Intermediate

    A liveness probe tells Kubernetes when to restart a stuck container. A readiness probe tells it when a Pod can receive traffic. A Pod that is not ready is taken out of the Service.

  8. How do you handle configuration and secrets?Intermediate

    ConfigMaps hold non-sensitive settings and Secrets hold sensitive values. Both can be passed as environment variables or mounted as files. Secrets are only base64 encoded by default, so enable encryption at rest and restrict access.

  9. What is an Ingress, and how is it different from a Service of type LoadBalancer?Advanced

    An Ingress routes external HTTP and HTTPS traffic to many Services based on host and path, with one entry point. A LoadBalancer Service usually creates one cloud load balancer per Service, which costs more.

  10. How do you scale automatically and keep important apps safe during maintenance?Advanced

    The Horizontal Pod Autoscaler adds or removes Pods based on metrics such as CPU. Resource requests and limits guide scheduling. PodDisruptionBudgets keep a minimum number of Pods running during node drains.

Back to Learn Hub

Guides are simplified on purpose. Tool names and details change, so check the official documentation before relying on a detail.