KubeNation
A simpler way to understand Kubernetes.
So last Sunday, i.e. 3rd September 2023 I went to a meetup organized by CNCF New Delhi.
So, in this meetup, there were many inspirational and educational talks given, but for me, there was one session that stood out from all. It was around the basics of Kubernetes, and various terminologies around it. This talk was given by Siddhant Khisty and Aakansha Priya.
I'm going to summarize that session here in this blog, so let's begin.
What is Kubernetes?
Whenever you Google this question, you'll find terms like
DeFacto Container Orchestrator
widely used in the industry
amazing distributed system
complicated
and especially very easy to get it wrong
But we're not going to see it this way today and use our imagination to make it easier to understand.
KubeNation
Imagine you are a person who wants to make a new nation, who is bored of all the countries and everything.
What things you'll need:
Land
Authority
People & Homes
Communication
Hard Workers
Land
You need land, your territory to rule over. How can you get land, there can be 4 major ways to get your hands on some land.
๐ต Buy
๐ Rent
โ๏ธ Conquer
๐ฅท๐ป Steal
The last 2 are not recommended โ ๏ธ.
Now you have land, and you decided to divide your land into 4 cities.
Your national capital, where all the administration resides
A Park City, to keep the environment healthy
Industrial City, to pump up the economy
And Night City, coz why not (Who else likes cyberpunk 2077)
Authority
We have to distribute the power too, who'll make the decisions, who'll ensure that everyone works properly and other things too.
So, let's divide the work.
There are four posts that you created for the country's authority and administration.
Mr. President
Governs the nation
Makes important decisions
decide who should know about his decisions
and also represents the nation
Mr. Manager
He makes sure everyone works
checks if all the cities are working properly
Are people able to communicate
And checks what's for lunch today
Mr. Task Manager
Assign work to everyone
Decide where to give the task
A Central Record
Keeps a record of everything like
What were the past decisions
Who's doing what task
Progress of each task
If tasks failed, why?
Who lives in the nation
And who are people talking to
People & Homes
Everyone in this KubeNation has his own home, where he and his family live happily.
Communication
We made communication between people easier and accessible to all.
People can communicate with each other using phones, mobiles etc.
The Hard Workers
We're going to divide some essential tasks with the workers.
We've two types of workers with us, builders and communication.
Builders
build houses
and rebuild any damaged or destroyed houses
making sure people stay in their respective homes
They are available in every city
Communications
Make sure people talk with each other
deliver messages to people
enforce rules for better and hassle-free communication
They're available in every city too
Now you have the country of your dreams.
That was an easy task, wasn't it?
Congratulations ๐๐๐๐, you just learned the entire Kubernetes architecture. Confused? Let us go through our nation again and now I'll tell you about the Kubernetes architecture on the go.
Land
Your computer, laptop, PC, server, whatever you have becomes your land.
This is your territory to make your nation the leader of the world.
Talking about cities, your capital city becomes your Control Plane Node, other cities serve as nodes.
The Control Plane Node handles everything like all the authorities in the capital city.
Authority
So, let's rename all the positions we had in our authoritative organization.
Mr. President โก๏ธ Kube-API server
Mr. Manager โก๏ธ Controller Manager
Mr. Task Manager โก๏ธ Kube Scheduler
The Central Records โก๏ธ ETC-D
Homes and People
The homes are called the pods where all the containers reside, which represent the people.
The pod contains all the containers and there can be more than one pod in a node, just like there can be more than one home in a city.
Communication
The pods communicate with each other using services. Services provide a stable endpoint for pods to communicate with each other. A service can be used to expose a set of pods to other pods within the cluster.
The Hard Workers
The hardest workers, builders and communications are replaced by Kubelet and Kube-proxy in Kubernetes respectively.
Kubelet helps in creating and maintaining pods, whereas Kube-proxy maintains the communication between the pods to run smoothly.
Conclusion
Now you can see what a cluster in Kubernetes looks like.
Here the control plane node is the capital city with all the authority and keeps a check on every node (city).
Only the control plane node consists of the Kube-API server (president), controller manager (manager), Kube Scheduler (Task Manager) and ETC-D (the central records)
Each node (city) contains its kubelet (builder) and k-proxy (communications) to maintain pods (homes) and communication between them. The pods (homes) communicate with the help of services (phones etc.)
This is how you can understand the architecture of Kubernetes. Thanks again to Siddhant Khisty and Aakansha Priya for making this complex topic so simple.
See you folks again. ๐๐ป๐๐ป