The rise of microservices caused an increased usage of container technology. Containers are the best option to host microservices as they can host small independent services on each container. With microservices, the applications which used to be monolith are now shifted to microservices generating hundreds and thousands of containers. Managing these containers in several different environments manually or with self-made scripts is a cumbersome task. Hence there should be a solution to mitigate this issue.
What is Kubernetes?
It is an open-source container orchestration tool developed by Google. It has been developed to address the above-discussed issue by providing an easy way or a tool to manage the growing population of containers.
Features of Kubernetes
- High availability and Less down time
- Disaster recovery and self healing capabilities
- Scalability (Horizontal)
- Load balancing
- Rolling update and rollback
- Resource monitoring and logging
Kubernetes Basic Architecture
- The master node runs the Kubernetes processes, necessary to run and manage clusters properly
- Worker nodes are the places where actual work happens
- API Server: Entry point to K8s cluster
- Controller Manager: Keeps track of what is happening in the cluster
- Scheduler: Responsible for scheduling containers on different worker nodes based on the workload and available resources in each node. It decides on which worker node the next container should be scheduled on.
- etcd: Holds data as key-value pairs. This holds the current state of the Kubernetes cluster. Also contains all the configuration data and status data of each container in the worker nodes AKA snapshots.
Pods in K8s
- In K8s you only work with pods
- Pod: This is the smallest unit you could find in Kubernetes and works as a wrapper to a container
- Each node can have multiple pods
- Each pod can have multiple containers
- Usually, one pod is used for a one application
- Each pod has its own IP address.
- Pods communicate with each other using internal IP addresses
- Pod gets a new IP address when created
- To get a static IP address to a pod Service can be used
- Service has main two features,
- Permanent IP address
- Load Balancing
Wanna know more?👇
Top comments (0)