Kubernetes

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

What is the architecture and components of Kubernetes?

Kubernetes is deployment and management platforms. It offers container orchestration, a container runtime, container-centric infrastructure orchestration, load balancing, self-healing mechanisms. It is used to compose, scale, deploy, and manage application containers across host clusters.

An environment running Kubernetes consists of the following basic components: a control plane (master), a distributed key-value storage system for keeping the cluster state consistent (etcd), and cluster nodes

Kubernetes architecture components or K8s components include the Kubernetes control plane and the nodes in the cluster. The control plane or master machine components include the Kubernetes API server, Kubernetes scheduler, Kubernetes controller manager, and etcd. Kubernetes node components include a container runtime engine or docker, a Kubelet service, and a Kubernetes proxy service.

  • Kubernetes API Server – The front end of the Kubernetes control plane, the API Server supports updates, scaling, and other kinds of lifecycle orchestration by providing APIs for various types of applications
  • Kubernetes Scheduler – stores the resource usage data for each compute node; determines whether a cluster is healthy; and determines whether new containers should be deployed.
  • Kubernetes Controller Manager – The controller watches the objects it manages in the cluster as it runs the Kubernetes core control loops. It observes them for their desired state and current state via the API server
  • ETCD – key-value store database that stores configuration data and information about the state of the cluster
  • Container Runtime Engine – Each compute node runs and manages container life cycles using a container runtime engine(eg – docker)
  • Kubelet service – Each compute node includes a kubelet, an agent that communicates with the master or control plane to ensure the containers in a pod are running. When the control plane requires a specific action happen in a node, the kubelet receives the pod specifications through the API server and executes the action. It then ensures the associated containers are healthy and running
  • Kube-proxy service – Each compute node contains a network proxy called a kube-proxy that facilitates Kubernetes networking services
Kubernete architechture

What is POD?

  • POD is the smallest unit in K8s
  • POD cannot be created it can only be instantiated
  • POD contains one or more containers
  • POD represents the processes running in a cluster, through which health of the containers can be identified
  • It has unique IP address
  • It has persistent storage volumes
  • It has configuration information that determine how a container should run
  • When pods contain multiple containers, communications, and data sharing between them is simplified. Since all containers in a pod share the same network namespace, they can locate each other and communicate via localhost
  • Pods are created by workload resources called controllers, which manage rollout, replication, and health of pods in the cluster. For example, if a node in the cluster fails, a controller detects that the pods on that node are unresponsive and creates replacement pod on other nodes