Day 30 Task: Kubernetes Architecture

Kubernetes Overview

Kubernetes is an open-source platform used alongside Docker to deploy, maintain, and implement container applications. A container application is an application that has all its packages, files, and necessary libraries required to run efficiently on various platforms.

Kubernetes was first released in 2014 to make applications run on the cloud.

image

1)What is Kubernetes? Write in your own words and why do we call it k8s?

Kubernetes is an open-source platform that automates the deployment, scaling, and management of containerized applications. It was designed to simplify the process of running and managing containers in large-scale, multi-node environments.

The name "k8s" is simply a shorthand for "Kubernetes". The number 8 represents the number of letters skipped between the "K" and the "s" in the word "Kubernetes".

2)What are the benefits of using k8s?

The benefits of using Kubernetes (k8s) :

  1. Run applications in containers efficiently.

  2. Keep applications up and running even if a node fails.

  3. Easily deploy and update applications.

  4. Scale applications to meet demand.

  5. Improve security for applications.

  6. Run applications in different environments with ease.

3)Explain the architecture of Kubernetes

The architecture of Kubernetes consists of several main components:

1)API Server: The API Server is the main interface for communication between the Master node and the worker nodes. It exposes the Kubernetes API, which can be used to manage the cluster and deploy applications. the central management component that exposes the Kubernetes API.

2)Scheduler: The Scheduler is responsible for assigning pods to worker nodes based on resource requirements and constraints.

3)Controller Manager: manages the state of the cluster. The Controller Manager is responsible for running various controllers that regulate the state of the cluster, such as the replication controller and endpoints controller.

4)etcd: etcd is a distributed key-value store that stores the configuration data for the cluster(such as number of pods, their state, namespace, etc), API objects and service discovery details.

5)kubelet: kubelet is a process running on each worker node that communicates with the Master node to receive instructions and ensure the containers are running as intended.

6)kubectl: kubectl is the command-line interface for interacting with the Kubernetes API.

7)Master Node : The Master node acts as the control center for the cluster, managing the desired state of the cluster and ensuring that the actual state matches the desired state.

8)Worker Nodes : Worker nodes are where your application containers run. They communicate with the Master node to receive instructions and report their status.

4)What is Control Plane?

The Control Plane manages the worker nodes and the Pods in the cluster. In production environments, the control plane usually runs across multiple computers and a cluster usually runs multiple nodes, providing fault-tolerance and high availability. Components of Control Plane includes API server, etcd, scheduler, and controller manager.

5)Write the difference between kubectl and kubelets.

kubectl is the command-line interface (CLI) tool for working with a Kubernetes cluster. It communicates with the API server to perform various operations on the cluster, such as deploying applications, scaling resources, and inspecting logs.

Kubelet is the technology that applies, creates, updates, and destroys containers on a Kubernetes node. Kubelets are the agents that run on each node in the cluster and communicate with the API server to ensure the desired state of the cluster is maintained. They manage the containers running on their node and communicate the status of those containers to the API server.

6)Explain the role of the API server.

When you interact with your Kubernetes cluster using the kubectl command-line interface, you are communicating with the master API Server component.

The API Server is the main management point of the entire cluster. In short, it processes REST operations, validates them, and updates the corresponding objects in etcd. The API Server serves up the Kubernetes API and is intended to be a relatively simple server, with most business logic implemented in separate components or in plugins.

The API Server is also responsible for the authentication and authorization mechanism. All API clients should be authenticated in order to interact with the API Server.