8,507 views

Kubernetes (a.k.a K8s) is an open-source container-orchestration system which manages the containerised applications and takes care of the automated deployment, storage, scaling, scheduling, load balancing, updates(rolling-updates), self-healing, batch-execution and monitoring of containers across clusters of hosts.

Kubernetes was originally developed by Google labs and later donated to Cloud Native Computing Foundation (CNCF). 

Why Kubernetes?

There are multiple Container-Orchestration systems available today but Kubernetes has become more popular as it is cost efficient and provides a lot of options to customize deployments and has support for many different vendors. It is supported on all major public cloud service providers like GCP, Azure, AWS, Oracle Cloud, Digital Ocean etc. 

Kubernetes Architecture


Kubernetes follows the master/slave architecture. So, we have the master nodes and the worker nodes. The master nodes manage the worker nodes and together they form a cluster. A cluster is a set of machines called nodes. A Kubernetes cluster has at least one master node and one worker node. However, there can be multiple clusters too. 

Kubernetes Master Node/ Control Plane


Kubernetes Master Node/Control Plane is the controlling unit of the cluster which manages the cluster, monitors the Nodes and Pods in the cluster, and when a node fails, it moves the workload of the failed node to another working node.

The various components of the Kubernetes Master Node:

API Server

The API Server is responsible for all communications (JSON over HTTP API). The Users, management devices, and Command line interfaces talk to the API Server to interact with the Kubernetes cluster. kubectl is the CLI tool used to interact with the Kubernetes API.

Scheduler 

The Scheduler schedules Pods across multiple nodes based on the information it receives from etcd, via the API Server.

Controller Manager

The Controller Manager is a component on the Master Node  that runs the Controllers. It  runs the watch-loops continuously to drive the actual cluster state towards the desired cluster state. It runs the Node/Replication/Endpoints/Service account and token Controllers and in case of the Cloud Platforms, it runs the Node/Route/Service/Volume Controllers.

etcd

etcd is the open-source persistent, lightweight, distributed key-value database developed by CoreOS, which communicates only with the API Server. etcd can be configured externally or inside the Master Node.

Worker Node 

A Worker Node can have one or more Pods, and a Pod can have one or more Containers, and a Cluster can have multiple Worker Nodes as well as Master nodes. Node components (Kube-proxy, kubelet, Container runtime) run on every Worker Node, maintaining the running Pods and providing the Kubernetes run-time environment.

The various components of the Kubernetes Worker Node:

kubelet

kubelet is an agent running on each Worker Node which monitors the state of a Pod (based on the specifications from PodSpecs), and if not in the desired state, the Pod re-deploys to the same node or other healthy nodes.

Kube-proxy

The Kube-proxy is an implementation of a network proxy (exposes services to the outside world) and a load-balancer (acts as a daemon, which watches the API server on the Master Node for the addition and removal of services and endpoints).

Container runtime/ Docker

Kubernetes does not have the capability to directly handle containers, so it requires a Container runtime. Kubernetes supports several container runtimes, such as Docker, Containerd, Cri-o etc. 

Add-ons 

Add-ons add to the functionality of Kubernetes.Some of the important add-ons are:

DNS – Cluster DNS is a DNS server required to assign DNS records to Kubernetes objects and resources.

Dashboard – A general purpose web-based user interface for cluster management.

Monitoring – Continuous and efficient monitoring of workload performance by recording cluster-level container metrics in a central database. 

Logging – Saving cluster-level container logs in a central database.

Get started with Kubernetes today

  • Lab 01 – 5-Node Kubernetes Cluster in 5 Minutes
  • Lab 02 – Kubernetes Cluster on AWS using Kops 
  • Lab 03 – Installing Portainer to Monitor Kubernetes 
  • Lab 04 – Deploy Your First Nginx Pod over Kubernetes Cluster
  • Lab 05 – A Quick Look at Kubernetes ReplicaSet101 
  • Lab 06 – A Quick Look at Kubernetes Deployment 101
  • Lab 07 – A Quick Look at Kubernetes Scheduler 101
  • Lab 08 – A Quick Look at Kubernetes DaemonSet101
  • Lab 09 – A Quick Look at Kubernetes RBAC 101
  • Lab 10 – Setting up GKE using Docker Desktop
  • Lab 11 – Installing WordPress App on Kubernetes using Helm
  • Lab 12 –KubeZilla


Ajeet Raina

My name is Ajeet Singh Raina and I am an author of this blogging site. I am a Docker Captain, ARM Innovator & Docker Bangalore Community Leader. I bagged 2 special awards last year(2019) : Firstly, “The Tip of Captain’s Hat Award” at Dockercon 2019, San Francisco and secondly, “2019 Docker Community Award“. I run Collabnix Community Slack with over 4700+ audience as well as Redis Community Slack with close to 500+ members. I have built popular GITHUB repositories like DockerLabs, KubeLabs, Kubetools, RedisPlanet Terraform etc. with the support of Collabnix Community. Currently working as Developer Relations Manager at Redis Labs where I help customers and community members adopt Redis. With over 11,000+ followers over LinkedIn & close to 4800+ twitter followers, I like sharing Docker and Kubernetes related content . You can follow me on Twitter(@ajeetsraina) & GitHub(@ajeetraina)

0 Comments

Leave a Reply

Your e-mail address will not be published. Required fields are marked *