Features:
- Container management - Can manage docker containers and other vendor containers as well so it is container-native orchestration tool.
- HA - Create a container on a healthy node if any container goes down.
- Scaling & Load Balancing - Scale containers based on load and other various parameters, hence balancing the load.
- Rolling Update - Update containers without impacting and support many other update strategies.
- Rollback - Rollback updates if something went wrong without impact.
Architecture:
K8s Cluster has two main nodes:
- Master node (Control Plane): Manages nodes and whole cluster.
- K8S Nodes/ Minions (Worker Nodes): Actual worker nodes where Pods are scheduled to run containers.
Cluster Components:
- API-Server- Api server facilitates the communication with Kubernetes cluster through the
Kubectl
command. We provide themanifest yaml
file through Kubectl and API-server works accordingly. It interacts withscheduler
,Controller
, andKey-value store
(etcd). - Controller- Manages the health of the cluster and controls everything. Suppose 100 nodes are defined in the manifest file then the controller keeps track to ensure that 100 nodes are running.
- Scheduler- Schedules the nodes/pods in the cluster according to the manifest file.
- Key-value store (etcd) - This is the true source of information and store nodes information in the form of Key-value. Any node information can be fetched from this store.
- Kublet- Kublet is like a manager on a minion node. API-Server interacts with Kublet to deploy the containers. The Kublet interacts with the controller and reports everything about the minion node. All the decisions are then taken by the controller.
- Pod- Pod is the wrapping around the container. A pod is a basic unit in a Kubernetes cluster.
We do not deploy a Container, always a Pod is deployed and Container runs inside Pod. A pod can have multiple Containers but in general, a single Pod contains a single Container as a best practice.
Pod is assigned an IP that is shared among Containers running inside Pod. A pod is also the scaling unit in Kubernetes. - Kube-Proxy- Kube-Proxy acts like a network brain of the cluster and manages the network communication within the cluster.
- Runtime- Every node has its own runtime that might differ from other nodes. The most commonly used runtime is docker. This runtime is used to run the containers.
Interaction with a K8s Cluster:
- API: Everything happens through API requests.
- Native Libraries: If you are a developer and have a used case to manage the cluster using a coding language then you have native libraries to interact with the cluster.
- Kube controler (kubectl): This is the main and most used way to connect with a k8s cluster and get the job done.
Top comments (0)