πΏππππππ πΆπ β π° ππππππππππ πΊπππππππππ πππππ’
ππΆπ£π¦π³π―π¦π΅π¦π΄ π’π―π₯ πͺπ΅π΄ πͺπ―π₯πΆπ΄π΅π³πͺπ’π πΆπ΄π¦ π€π’π΄π¦
Hello everyone,
In this blog, we are going to discuss the following points:
- What is Kubernetes?
- Why we need Kubernetes?
- What is its industry use case?
- How does Kubernetes work?
So letβs get started π©βπ»
ππ©π’π΅ πͺπ΄ ππΆπ£π¦π³π―π¦π΅π¦π΄?
Before we start with what is Kubernetes? we should know what are containers and what is the drawback of containers.
Containers:
Containers are a form of operating system virtualization. A single container might be used to run anything from a small microservice or software process to a larger application. Inside a container are all the necessary executables, binary code, libraries, and configuration files.
This makes the container fast, reliable, lightweight, and scalable, then there is a problem that comes with that and this is what is the result of the need for Kubernetes.
Containers are scalable, we can scale two containers or four but in the real world, we have to scale it up to 50 or 100 containers and that kind of scalability is not easy and we need to manage those containers and making sure servers are connected to each other.
The drawback of the container are:
- The container at that scale is hard to manage as containers should be connected to each other if they are not connected there is no reason for scalability.
- Distributing traffic in challenging in containers.
- Containers are not auto-scalable
In containers when lots of traffic comes to the server it makes hard for the server to handle that much traffic then we need to manually scale up the server and if again traffic increase again we need to manually scale up, which is not ideal and soon the time will come when the server will crash.
And thatβs where Kubernetes comes into play, what Kubernetes does is it keeps analyzing the traffic and load that has been used by the container, and when traffic reaches its threshold auto-scaling happens. If more traffic comes up Kubernetes auto-scale up the container.
So, kubernetes is an open source Container Management tool which automates container deployment, container scaling, descaling and container load balancing.
The Feature of Kubernetes are:
- Automatic Binpacking
- Service Discovery and Load balancing
- Storage Orchestration
- Self Healing
- Secret and Configuration Management
- Batch Execution
- Horizontal Scaling
- Automatic Rollback and Rollouts
Now we have discussed What Kubernetes is and why we need it so, now letβs discuss its industry use caseβ¦
β β β β β β β β β β β βοΌ΅οΌ³οΌ₯ οΌ£οΌ‘οΌ³οΌ₯ β β β β β β β β β β
οΌ°ο½ο½ο½ ο½ο½ο½ οΌ§ο½
PokΓ©mon Go is a 2016 augmented reality mobile game developed and published by Niantic in collaboration with The PokΓ©mon Company for iOS and Android devices. A part of the PokΓ©mon franchise, the game is the result of a collaboration between Niantic, Nintendo, and The PokΓ©mon Company.
The Challenge faced by the PokΓ©mon Go Engineers:
PokΓ©mon Go engineers never thought their user base would increase exponentially surpassing the expectations within a short time. Even the servers couldnβt handle this much traffic.
The challenges were:
- The biggest challenge for any application is Horizontal Scaling.
- But for PokΓ©mon Go Vertical Scaling was also a major challenge, because of real-time activity in a gaming environment for millions of users worldwide.
- Niantic was prepared for traffic disasters of up to 5x time
What was the solution for these challenges?
The Solution βThe magic of containersβ. The application logic for the game ran on Google Container Engine (GKE) powered by the open-source Kubernetes project.
Niantic chose GKE for its ability to orchestrate their container cluster at a planetary-scale, freeing its team to focus on deploying live changes for their players. In this way, Niantic used Google Cloud to turn PokΓ©mon Go into service for millions of players, continuously adapting and improving. This got them more time to concentrate on building the gameβs application logic and new features rather than worrying about the scaling part.
Here you heard the term orchestrate and that might made you think what that is, so let me simplify it for you.
Kubernetes orchestration allows you to build application services that span multiple containers, schedule containers across a cluster, scale those containers, and manage their health over time. Kubernetes eliminates many of the manual processes involved in deploying and scaling containerized applications.
βGoing Viralβ is not always easy to predict but you can always have Kubernetes in your tech stack.
How does Kubernetes work?
So in Kubernetes, there is a Kubernetes master that controls everything, point to be noted that the container does not run in Kubernetes Master, containers run in nodes.
First, we need to create a master thatβs the first step to create a cluster then connect nodes to the master. Master only be scheduling and replicating containers to the nodes and makes sure that configurations are right.
There is two way to access Kubernetes master:
- UI
- CLI
The default way to access the Kubernetes master is using CLI.
Lets first discuss the terminologies:
- Master: Master control the cluster and nodes in it.
- Node: Node host the container inside them and containers are inside pods.
- Pods: Pods are a logical collection of containers that need to interact with each other for an application.
So basically Master control the nodes and inside the, here are containers and containers are stored in multiple pods.
Hope this blog was helpful to youβ¨
Thank you!!β