What is Kubernetes (K8s)?
Docker solved the problem of "how to package and run an application regardless of the ecosystem". But, what happens when you enter the big leagues?
Imagine you work at Netflix or Spotify. Spinning up your application does not require one or two containers. It requires hundreds or thousands of identical containers running concurrently all over the world to support millions of users.
- What happens if a physical server (a Node) goes up in flames and 50 of those containers die?
- Who checks at 3:00 AM if a container ran out of RAM to turn it off and bring up a replacement?
- How do you ensure that if tomorrow the SuperBowl broadcasts and your traffic multiplies by 10, your containers automatically go from 5 to 500, and back to 5 the next day so as to not waste money?
Docker does not know how to do any of this by itself.
Google's answer, which they later donated to the Open Source world, is the conductor of the orchestra: Kubernetes.
The Architecture of a Cluster
Kubernetes is not a program that you run on your laptop (like you would with Docker Desktop). Kubernetes is a massive mesh (network) that overtakes multiple gigantic real servers and manages them as if they were a single massive super computer, which we call a Cluster.
A Cluster is divided into two types of staff:
1. The Control Plane (The Master Node)
It is the brains of the operation. You, the developer or administrator, only talk to it. It makes the grand resolutions. If you order it: "I want exactly 3 containers of my website to always be turned on", the Master Node will flawlessly watch over that directive 24 hours a day. It is omnipresent.
2. The Worker Nodes
They are essentially the slave computers that provide the ultimate brute force, the true RAM memory, and the processor to execute the actual application and do the hard work. If one of these physical servers perishes... The Master Node will simply notice its absence and will send all those containers to the remaining Workers with available capacity and space in milliseconds. You as a user didn't even hear about the fire.
Generally this term is abbreviated and read, across and throughout forums, job postings and articles as K8s (because there are exactly 8 formidable letters between its starting 'K', and its respective ending 'S').