Kubernetes(K8S), A word that has taken the tech world by a storm. People have been working towards bringing their products, enterprise applications into containerized architecture so that the benefits of containers can be utilized but bringing those applications into containerized format brought a lot many operational challenges.
Containers in their native format don’t provide a layer to manage and maintain the containers. it doesn’t bring visibility into the infrastructures of the containers which are deployed and their state.
K8S was open-sourced by Google in 2014 which was introduced with keeping all such things in perspective and allowing containerized applications to be managed easily. It provides a layer for enterprises to manage containerized workloads and services.
Kubernetes architecture is mainly divided into two modules, A Kubernetes Cluster consists of at least one master node and multiple compute nodes. The master is responsible for exposing the application program interface (API), scheduling the deployments, and managing the overall cluster. Each node runs a container runtime, such as Docker or rkt, along with an agent that communicates with the master. Nodes are the workhorses of a Kubernetes cluster. They expose compute networking and storage resources to applications. Nodes can be virtual machines (VMs) running in a cloud or bare metal servers running within the data center.
- Web UI
Web UI is a general-purpose, web-based UI for Kubernetes clusters. It allows users to manage and troubleshoot applications running in the cluster, as well as the cluster itself.
Command-line Interface also knows as kubectl allows us to manage the Kubernetes over command-line interfaces.
Kubernetes Master Components
Kubernetes master node works like a queen of the beehive making all the critical decisions for a cluster to maintain its required state. It makes global decisions about the cluster.
All the master components by default get started on a single machine and in a cluster setup, no other containers are running on a master node.
- API Server: Component which exposes Kubernetes API to control Kubernetes cluster
- Scheduler: This is the component that manages and maintains the container allocation of different nodes based on cluster utilization.
- Controller-manager: Component on the master which runs controllers. each controller has a separate process.
- Node Controller: Responsible for noticing and responding when nodes go down.
- Replication Controller: Responsible for maintaining the correct number of pods for every replication controller object in the system.
- Endpoints Controller: Populates the Endpoints object (that is, joins Services & Pods).
- Service Account & Token Controllers: Create default accounts and API access tokens for new namespaces.
- Cloud-Controller-manager: This is a specific feature which is an alpha feature introduced with Kubernetes 1.6. It provides interaction with underlying cloud infrastructures.
- Node Controller: For checking the cloud provider to determine if a node has been deleted in the cloud after it stops responding
- Route Controller: For setting up routes in the underlying cloud infrastructure
- Service Controller: For creating, updating, and deleting cloud provider load balances
- Volume Controller: For creating, attaching, and mounting volumes, and interacting with the cloud provider to orchestrate volumes
Kubernetes nodes are the worker nodes which does all the work and report back to the master node with all the updates and states of various pods running on them.
It’s a module that would be running on each and every node in a Kubernetes Cluster. It would ensure that the containers are running as per the Pods specifications which are being provided by the master node.
This module basically acts as a network proxy module that would maintain various network routes/rules to allow connection forwarding to various containers running on a node.
Container Runtime (Docker)
Kubernetes supports various container run-time environments which can be used to power various applications.
We are concluding this week’s article here. Next, we would continue with understanding Kubernetes Objects and various configuration options which it provides.
In case you are looking for a way to migrate your existing applications to Kubernetes, we at Datavizz help an enterprise to create an enterprise migration strategy to migrate your product to a Cloud-Native application stack.