23
Introduction to Kubernetes #1
- Kubernetes is an open-source container orchestration tool powered by Google.
- It helps us manage apps that are made of containers.
- Apps moving from a monolithic app structure to microservices comprise of isolated containers, and managing these containers can be a difficult task.
- Kubernetes guarantees
- High availability
- Scalability
- Disaster Recovery
- There is one master node and connected to it are a couple of worker nodes.
- Each node has a kubelet running on it that enables it to connect to other nodes.
- Worker nodes are where the actual work is happening.
- The master node runs several processes that are important to run Kubernetes. These processes are:
- API Server: This is a container that is an entry point to the Kubernetes cluster.
- Controller Manager: Keeps track of what is happening in the cluster.
- Scheduler: It is responsible for scheduling containers on different nodes.
- Etcd: It is key-value storage that holds the current state of a Kubernetes cluster at any given time. This is the backing store of Kubernetes
- Worker nodes run heavier tasks than master nodes but the master nodes run more important tasks.
- Pod: A pod is the smallest unit that a Kubernetes user can interact with.
- On each worker node, there are multiple pods and on each pod, there are multiple containers.
- We usually have one pod per application.
- Each pod has its own self-containing server and its own internal IP addresses.
- These pods connect to each other using this internal IP address.
- If a pod dies a new pod is created which has a new IP address.
Definition: An abstract way to expose an application running on a set of Pods as a network service.
Pods get created and destroyed all the time in Kubernetes according to the need of the deployment. Every time a new pod is created it gets a new IP address and its connection with other pods gets lost. It would be inconvenient to adjust the IP addresses all the time. This is where services come to play.
A service is set in front of a pod(or replica of pods) and has its own IP address which is permanent.Clients use this IP address instead of the pods' IP addresses. So even if a pod dies and the IP address gets changed, it won't affect the communication between the the services.
Services have many functionalities, it has a permanent IP address and at the same time it is a load balancer.
More about it on the next blog :)
Stay Tuned!
23