Kubernetes | A Basic Understanding | Architecture of K8s
Table of contents
What is Kubernetes?
Reasons for being famous - K8s
Architecture of Kubernetes
Control plane (master node) components
Worker node components
Summarize: What is my understanding?
What is Kubernetes?
Kubernetes is a portable, scalable open source platform to manage and deploy containerized applications, facilitates both declarative configuration and automation.
On my mind, what is container orchestration, then?
Example: I’m running my containarized applications on single docker engine, what if that docker engine fails? All my applications would go down.
Here, A container orchestration tool helps to provide high availability and scalability on Docker engines or nodes. It achieves this by managing worker nodes through master nodes in a cluster.
Kubernetes orchestrates containers across various runtimes, like Docker, RKT, or CRI, through pods. What are pods? discussed after features of Kubernetes.
Features of Kubernetes:
What is pod?
Example 1:
Example 2:
Reasons for being famous - K8s
Kubernetes has a big and diverse community:
This is larger and more active compared to its competitors like Apache Mesos and Docker Swarm.
The success can be attributed to Google's approach of allowing the community to drive Kubernetes' development, while other projects have more single-vendor influence.
Kubernetes has deep roots at Google:
Kubernetes has its origins in Google's internal technology called Borg, which was developed and used for over 15 years to manage the infrastructure behind popular Google services.
They aim to enhance developer productivity and create a positive impact on the world by scaling Kubernetes as an open-source solution.
Kubernetes is currently managed by the Cloud Native Computing Foundation (CNCF). In 2015, Google donated the Kubernetes project to the CNCF, but it still has Kubernetes has deep roots at Google.
Architecture of Kubernetes
The Kubernetes architecture has two main components: the master node (one per cluster) and the worker nodes (one or more per cluster).
The master node is like the central control center that manages and coordinates the entire Kubernetes cluster. It receives requests, schedules workloads, and ensures the cluster's overall health and stability.
On the other hand, the worker nodes are where the actual applications run, executing the assigned tasks. They communicate with the master node, run containers, and manage networking within the cluster.
Recommended by LinkedIn
Control plane (master node) components
Kube API Server:
It acts as the central control point for the cluster. It receives requests from users or other components and then processes and responds to them.
It provides a REST API that enables users to interact with the cluster and manage its resources.
API Server is the primary interface for interacting with the cluster and is the front end of the Kubernetes control plane.
Etcd server:
It is a distributed key-value store that stores the cluster's configuration data and state.
It helps maintain consistency and provides reliable storage for the cluster's information. Stores the current state of everything in the cluster.
Kube Scheduler:
It assigns workloads or tasks to the worker nodes based on resource availability, constraints, and other factors.
The scheduler makes sure that the workloads are distributed efficiently across the cluster.
Controller Manager:
It manages different controllers that handle cluster operations.
Node controller: Tracks worker node status and handles changes/failures.
Replication controller: Maintains desired pod replicas.
Endpoints: Updates endpoint objects.
Service Account and Token Controller: Creates default accounts and API tokens for namespaces.
Worker node components
Kubelet:
It is an agent that runs on each worker node and communicates with the master node.
The kubelet ensures that containers are running as intended on the node, based on the instructions received from the master node
Container Runtime:
It is responsible for running and managing containers on the worker nodes. Kubernetes supports various container runtimes, such as Docker, containerd, and CRI-O.
The container runtime is responsible for creating the containers and setting up their networking and storage resources, as well as monitoring their health and resource usage.
kube-proxy:
It handles network communications between different services or pods running on the worker nodes.
It manages the network routing, load balancing, and firewall rules to enable communication within the cluster.
Summarize: What is my understanding?
Containers have been in use for a long time, but managing microservices with them posed challenges in terms of scalability, high availability, automation, portability, and management. To address these issues, Google introduced Kubernetes, that they had developed to manage their own containerized services.
Later Kubernetes converted as an open source gained popularity due to its strong infrastructure and the added advantage of a supportive community. It simplified the management of containers, making them easily disposable while providing the desired features.
In the above blog, I explained the architecture of Kubernetes and highlighted the need for Kubernetes and the issues it resolves.
Let's connect and have a conversation. If you have any questions or would like to share your experiences, I encourage you to leave a comment below or reach out to me. Your feedback could be helpful for me in improving the blog, so please don't hesitate to reach out with any suggestions or corrections.
Devops-IT-Ops @ colpari GMBH, Germany | Ex-Accenture
2wAmazing !! Good for revision