appzasGamesToolsDevLearnCheat sheetsQuick calcsConvertersReferenceNetworkTimeCalculatorsCompareLLM prices

What is Kubernetes?

Lesson 1 of 58 minIntermediate

A system that keeps your containers running the way you declared, across many machines.

Kubernetes (often written K8s) is an open-source system that runs containers on a group of machines and keeps them in the state you asked for. You describe what you want, for example "three copies of this web app", and Kubernetes makes it true and keeps it true.

The problem it solves

One container on one server is easy. Real systems need many containers across many servers: start them, restart the ones that crash, spread traffic, roll out new versions without downtime and scale up when load grows. Doing that by hand does not work.

Declarative, not imperative

You do not tell Kubernetes the steps. You send it a desired state written in YAML. Controllers inside the cluster compare the desired state with the real state all the time and fix any difference. This loop is the core idea of Kubernetes.

The pieces of a cluster

  • Node: a machine (physical or virtual) that runs your containers.
  • Control plane: the brain. It holds the API server, the scheduler that picks a node for each workload and the controllers that enforce the desired state.
  • kubelet: an agent on each node that starts and watches the containers.
  • etcd: the database where the cluster stores its state.

NoteEverything goes through the API server. The kubectl command line tool is just a client that talks to it.

CarefulKubernetes adds real complexity. For one small app on one server, plain Docker or Docker Compose is usually the better choice.

Test yourself

Answer all the questions, then check them. Finish with every answer right to mark the lesson as done.

1. What do you give Kubernetes to describe what you want?
2. Which component picks the node where a new workload will run?
3. What is kubectl?

Key terms