100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

What is Kubernetes?

Learn what Kubernetes is — pods, deployments, services, self-healing, scaling and rolling updates — with clear examples and DevOps interview questions answered.

mediumQ3 of 224 in DevOps Est. time: 6 minsLast updated:
Open Code Lab

Expected Interview Answer

Kubernetes is an open-source container orchestration platform that automates deploying, scaling, and managing containerized applications across a cluster of machines, keeping them running in the desired state you declare.

You describe the desired state — how many replicas, which image, what network exposure — and Kubernetes continuously works to match it. Its building blocks include pods (the smallest deployable unit, wrapping one or more containers), deployments (which manage replica sets and rolling updates), and services (which give pods a stable network endpoint and load-balance across them). Kubernetes provides self-healing by restarting or rescheduling failed pods, horizontal scaling to add or remove replicas under load, and rolling updates for zero-downtime releases, all coordinated by a control plane against worker nodes.

  • Self-healing: restarts and reschedules failed containers
  • Automatic horizontal scaling under load
  • Rolling updates and rollbacks with zero downtime
  • Declarative desired-state management

AI Mentor Explanation

Kubernetes is like a team management system that always keeps eleven fit players on the field. You declare the desired line-up, and if a player is injured (a pod fails) a substitute is sent on automatically — that is self-healing. When the match intensifies it can field more specialists (scaling), and it swaps players one at a time so play never stops (rolling updates). The captain and coaching staff form the control plane, directing players across the ground exactly as your team sheet demands.

Step-by-Step Explanation

  1. Step 1

    Declare desired state

    Write a manifest saying which image, how many replicas, and how it is exposed.

  2. Step 2

    Pods and deployments

    A deployment creates and maintains the requested number of pods running your containers.

  3. Step 3

    Services and networking

    A service gives pods a stable endpoint and load-balances requests across them.

  4. Step 4

    Self-heal and scale

    The control plane restarts failed pods and adds or removes replicas to match load and desired state.

What Interviewer Expects

  • Kubernetes as container orchestration, not a container runtime itself
  • Core objects: pods, deployments, services
  • Self-healing, scaling, and rolling updates
  • Declarative desired-state reconciliation by the control plane

Common Mistakes

  • Confusing Kubernetes with Docker (orchestrator vs runtime)
  • Thinking a pod always holds exactly one container
  • Ignoring the declarative desired-state model
  • Not knowing what a service does for pod networking

Best Answer (HR Friendly)

Kubernetes is a system that runs and manages lots of containerized apps across many machines for you. You tell it what you want running, and it keeps that going — restarting anything that crashes, adding copies when traffic rises, and updating apps without downtime.

Code Example

A Deployment declaring desired state
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
        - name: web
          image: nginx:1.27
          ports:
            - containerPort: 80

Follow-up Questions

  • What is the difference between a pod and a container?
  • How does a Kubernetes service differ from a deployment?
  • What does the control plane do?
  • How does Kubernetes perform a rolling update?

MCQ Practice

1. What is the smallest deployable unit in Kubernetes?

A pod is the smallest deployable unit; it wraps one or more containers that share networking and storage.

2. What does a Kubernetes service primarily provide?

A service gives a stable address and load-balances traffic across the matching pods, which come and go.

3. What does Kubernetes self-healing do when a pod crashes?

The control plane reconciles actual state with desired state, recreating failed pods automatically.

Flash Cards

What is Kubernetes?A container orchestration platform automating deployment, scaling and management of containers.

What is a pod?The smallest deployable unit — one or more containers sharing network and storage.

What does a deployment manage?A set of replica pods, handling rolling updates and rollbacks.

What is self-healing?Kubernetes restarts or reschedules failed pods to keep the declared desired state.

1 / 4

Continue Learning