Getting Started with Kubernetes: Architecture, and Key Features Explained
Introduction
Kubernetes (often abbreviated as K8s) is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. Originally developed by Google, Kubernetes has become the leading solution for managing applications in cloud and hybrid environments.
Kubernetes Architecture
Kubernetes Architecture Summary
Control Plane
API Server:
The
API Server is considered the heart of a Kubernetes cluster
. It acts as the central communication hub that all components interact with.It processes requests and keeps track of everything in a storage system called etcd.
It also manages access, deciding who can do what in the cluster.
etcd:
This is a distributed key-value store.
etcd holds the current state of all Kubernetes resources
, including Pods, Secrets (for sensitive information), ConfigMaps (for non-sensitive configuration data), Deployments, Services, and more.It keeps important information, such as details about Pods and their statuses.
Scheduler:
This component watches for any Pods that haven’t been scheduled yet.
It decides and schedules the best node for each Pod based on the available resources.
Then, it updates the API Server so that etcd can reflect where each Pod is assigned.
Controller Manager:
This part keeps an eye on the state of all nodes in the cluster.
It makes sure everything is running the way it should.
If
something goes wrong
with a Pod, like it crashing, theController Manager steps in to fix the problem
by restarting or moving the Pod.
Worker Node
Worker Node:
A machine in the Kubernetes cluster that runs applications and manages containers.
Each worker node hosts Pods, which are the smallest deployable units in Kubernetes.
Kubelet:
The main agent on each worker node.
It continuously
monitors the status of Pods and the worker node
itself to ensure both are functioning properly.If there’s an issue with any Pods on the node, it tells the API Server, which then coordinates with the Controller Manager to fix the problem.
Container Runtime:
This is the software that actually runs the containers on the worker node.
Examples include Docker, containerd, and CRI-O.
kube-proxy:
This manages network traffic for the cluster
.It ensures that Pods can communicate with each other and with other services.
Pods:
These are the smallest deployable units in Kubernetes.
A Pod can hold one or more containers.
They are hosted on Worker Nodes and run your applications.
Key Features of Kubernetes (K8s)
Auto-Scheduling:
Kubernetes automatically assigns Pods to the best nodes based on available resources, ensuring optimal use of your infrastructure.Self-Healing:
If a Pod fails or is not responding, Kubernetes automatically replaces it or restarts it to maintain the desired state of the application.-
Automated Rollbacks and Rollouts:
Kubernetes can roll out updates to applications seamlessly and, if something goes wrong, it can quickly roll back to a previous stable version. Horizontal Scaling:
Kubernetes can automatically scale applications up or down based on demand. This means it can add more Pods when traffic increases and reduce them when traffic decreases.-
Service Discovery & Load Balancing:
Kubernetes automatically assigns IP addresses and a single DNS name to a set of Pods, allowing them to communicate easily. It also balances the load across these Pods to ensure even distribution of traffic. Storage Orchestration
With Kubernetes, you can mount the storage system of your choice. You can either opt for local storage, or choose a public cloud provider such as GCP or AWS, or GCP use a shared network storage system such as NFS, EBS, etc.
Subscribe to my newsletter
Read articles from Kandlagunta Venkata Siva Niranjan Reddy directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by