Kubernetes Architecture : #Day30

Table of contents

Kubernetes Overview

What is Kubernetes?

Kubernetes also known as K8s was built by Google based on their experience running containers in production. It is now an open-source project and is arguably one of the best and most popular container orchestration technologies out there.

To understand Kubernetes, we must first understand two things – Container and Orchestration.

Containers:
Containers are completely isolated environments, as in they can have their own processes or services, their own network interfaces, and their own mounts, just like Virtual machines, except that they all share the same OS kernel.


Orchestration:
It is a technique that refers to the automated management and deployment of containerized applications across a clustered environment.

Kubernetes:

Kubernetes is known for its powerful orchestration capabilities, which enable the efficient operation of containerized workloads in a distributed environment.

What benefits of using k8s:

  1. Automated Container deployments with scaling, load balancing, High Availability capabilities

  2. Automated Application Deployments

  3. Service discovery and load balancing

  4. Automated rollouts and rollbacks

  5. Self-healing

  6. Secret and configuration management

-Application is highly available as hardware failures do not bring the application down because you have multiple instances of your application running on different nodes.

-The user traffic is load balanced across the various containers. When demand increases, deploy more instances of the application seamlessly and within a matter of seconds.

-When we run out of hardware resources, scale the number of nodes up/down without having to take down the application.

Explain the architecture of Kubernetes:

When you install Kubernetes on a System, you are installing the following components.
An API Server
An ETCD service
A kubelet service
A Container Runtime, Controllers and Schedulers.

Node

A node is a machine – physical or virtual – on which Kubernetes is installed.

Cluster

A cluster is a set of nodes grouped together.

Pods

A POD is a single instance of an application. A POD is the smallest object, that you can create in Kubernetes.

Master

The master node manages the entire cluster through the API server and is responsible for assigning tasks to worker nodes.

API Server

The API server acts as the front end for kubernetes. The users, management devices and Command line interfaces all talk to the API server to interact with the Kubernetes cluster.

Scheduler

The scheduler is responsible for distributing work or containers across multiple nodes. It looks for newly created containers and assigns them to Nodes.

Controller

The controllers are the brain behind orchestration. They are responsible for noticing and responding when nodes, containers or endpoints goes down. The controllers make decisions to bring up new containers in such cases.

etcd

ETCD is a distributed reliable key-value store used by Kubernetes to store all data used to manage the cluster. This component stores a dictionary of data. It is a Kubernetes database that stores all cluster data.

Container-runtime

The container runtime is the underlying software that is used to run containers. In our case it happens to be Docker.

kubelet

kubelet is the agent that runs on each node in the cluster. The agent is responsible for making sure that the containers are running on the nodes as expected.

Kube-proxy

This component manages the network and the ports exposed outside the cluster for users.

What is Control Plane?

The control plane manages the worker nodes and the Pods in the cluster.

Write the difference between kubectl and kubelets.

kubectl is the command-line interface (CLI) tool for working with a Kubernetes cluster.

Kubelet is the technology that applies, creates, updates, and destroys containers on a Kubernetes node.

Explain the role of the API server.

The API server acts as the front-end for Kubernetes. The users, management devices and Command line interfaces all talk to the API server to interact with the Kubernetes cluster.

"Thank you for reading my blog! Happy Learning!!!😊

Stay tuned for more DevOps articles and follow me on Hashnode and connect on LinkedIn (linkedin.com/in/namratakumari04 for the latest updates and discussions.