Day 30 Task: Kubernetes Architecture - 90DaysOfDevOps

Day 30 Task: Kubernetes Architecture - 90DaysOfDevOps

Kubernetes Overview

With the widespread adoption of containers among organizations, Kubernetes, the container-centric management software, has become a standard for deploying and operating containerized applications and is one of the most important parts of DevOps.

Originally developed at Google and released as open-source in 2014. Kubernetes builds on 15 years of running Google's containerized workloads and the valuable contributions from the open-source community. Inspired by Google’s internal cluster management system.

Tasks

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

Kubernetes is an open-source container orchestration tool to manage containers. It helps with scalability and easy deployment of applications as microservices.

K8s is the short form of Kubernetes where K and s refer to the first and last alphabets of Kubernetes and 8 represents the number of alphabets between K and s.

  1. What are the benefits of using K8s?

Below are a few major benefits of using K8s -

  • Auto healing

  • Auto Scaling

  • Resource allocation

  • Microservices

  • Ease of managing the containers

  1. Explain the architecture of Kubernetes.

Kubernetes architecture consists of two major components -

  1. Master node - The master node manages the desired state of the cluster.

  2. Worker node - Worker nodes are where we run our application container or pods.

The master node consists of below components -

  1. etcd - etcd is the database for Kubernetes where it keeps all information related to nodes, pods, configurations, accounts, roles, bindings, etc.

  2. API Server - The API server works as a communicator to establish communication between master and worker nodes. It is used to authenticate users, validate requests, retrieve data, update etcd, and to communicate with other components of the cluster.

  3. Control manager - The control manager continuously monitors the various components of the cluster and works towards managing and restoring it to the desired state.

    The Controler manager consists of other controllers such as -

    • Node controller

    • Replication controller

    • Cron controller

    • Deployment controller

    • Persistent volume controller

  4. Scheduler - The scheduler is responsible for scheduling the pods on nodes. It decides which pod to place on which node based on CPU, RAM, and other resources.

The worker node consists of below components -

  1. Kubelet - The kubelet registers the application on the nodes. It monitors the status and reports to the Kube API server.

  2. Kube Proxy - Kube proxy provides pod connectivity to the outside world. Pod network allows us to communicate pods to each other using Pod IPs but Kubeproxy help pods to connect to outside network.

Kubectl - Kubectl allows the user to connect to K8s.

  1. What is a Control Plane?

The control plane maintains communication with the worker nodes to schedule containers efficiently. It manages the worker nodes and pod in the cluster.

  1. Write the difference between kubectl and kubelets.

Kubectl is used as a command line interface that allows users to connect to the Kubernetes cluster whereas, kubelet registers the application on the nodes. It monitors the status and reports to the Kube API server.

  1. Explain the role of the API server.

The API server works as a communicator to establish communication between master and worker nodes. It is used to authenticate users, validate requests, retrieve data, update etcd, and to communicate with other components of the cluster.

Kubernetes architecture is important, so make sure you spend a day understanding it.

Happy Learning :)