Kubernetes School Chapter 1

A picture-book story about computers

Welcome to Kubernetes School

Imagine a very busy school.

A school that keeps growing

At first, the school has only one classroom and a few students.

Everything is easy to manage.

But over time, more students join.

Soon, one classroom is no longer enough.

The school opens more classrooms.

Then it adds more buildings.

Now the school has a new problem.

So many questions…

  • Who decides which classrooms should be opened?
  • Who checks whether each lesson is still running?
  • What happens when a classroom suddenly closes?
  • Who opens another classroom when more students arrive?
  • Who makes sure students are sent to a classroom that still has space?

We need a principal

Managing everything by hand would be difficult.

The school needs someone who can organise the classrooms, watch what is happening, and fix problems when they appear.

That person is the school principal.

In our computer story, the principal is called Kubernetes.

A cartoon blue octopus principal wearing a PRINCIPAL hat with the Kubernetes helm logo, pointing at a school campus. Maths classrooms 1, 2 and 3 are marked OPEN, while classroom 4 is CLOSED and broken. A clipboard shows desired state versus actual state.
In our computer story, the principal is called Kubernetes.

Meet Kubernetes

Kubernetes manages applications in a similar way to how a principal manages a school.

You tell Kubernetes how you want things to run.

For example, you might say:

“Always keep three maths classrooms open.”

Kubernetes checks the school.

If three maths classrooms are open, everything is fine.

But suppose one classroom suddenly closes.

Now only two maths classrooms are running.

Kubernetes notices that something has changed.

You asked for three classrooms, but only two are actually open.

So Kubernetes works to open another classroom.

Soon, there are three again.

Kubernetes keeps checking the school again and again.

It compares two things:

What you asked for.

What is actually happening.

Desired state and actual state

We can call these the desired state and the actual state.

The desired state is how you want things to be.

The actual state is how things really are right now.

For example:

Desired state:

Three maths classrooms should be open.

Actual state:

Only two maths classrooms are open.

Kubernetes sees the difference and tries to fix it.

Once another classroom is opened:

Desired state:

Three maths classrooms.

Actual state:

Three maths classrooms.

Everything matches again.

This is one of the most important ideas in Kubernetes.

What happens next

You do not have to stand there all day checking every classroom yourself.

Instead, you describe how you want things to be.

Kubernetes keeps watching and works to keep things that way.

And our digital school is only getting started.

Next, we will explore the different parts that make up Kubernetes School.