DevOps(Day-30) : Introducing Kubernetes

DevOps(Day-30) : Introducing Kubernetes

TABLE OF CONTENTS

What is Kubernetes?

Kubernetes is a container orchestration tool used for the deployment and management of 100s and 1000s of containers in a cluster environment.

We saw in Docker that it is used to create containers out of images. These containers' functionalities are managed by Kubernetes.

some advantages are:-

  • Hosts containerized workloads, providing them with computing, storage, and network resources.

  • Automatically manages large numbers of containerized applications keeping them healthy and available by adapting to changes and challenges.

    Why it is called K8s?

    The name Kubernetes originates from Greek, meaning helmsman or pilot. K8s as an abbreviation results from counting the eight letters between the "K" and the "s".

Benefits of K8s

  1. K8s provides holds the benefit of multi-cloud capability. Workloads can be kept in a single cloud or spread across different cloud platforms. With this, the benefits from different cloud platform tools can be utilized.

  2. Kubernetes allows you to create great digital solutions at highly affordable prices to help you get better profits.

  3. It provides the most stable platform for most complex applications. The least of concerns for people using Kubernetes as the platform offers unmatched stability.

  4. Kubernetes allows you to roll out updates easily and efficiently. This way, you can quickly give customers the new features, performance improvements, and bug fixes they require.

  5. Kubernetes is free and open-source software that operates with the support of an extensive community. This means you are free to use Kubernetes however you want. You don't need to pay for a software license, and you can even edit Kubernetes' code to better fit your needs.

  6. The community around Kubernetes is huge. This means many people have encountered and solved a lot of problems. That's why you'll easily find solutions to these problems documented online.

  7. A container orchestrator managing tens of thousands of containers must be accurate, stable, and reliable. Otherwise, many problems could pop up with such a huge army of containers. Fortunately, Kubernetes has been used in production for many years. And its code has been continuously refined by developers for many years. So it's safe to assume that Kubernetes is mature, stable, safe, and capable.

  8. The level of automation that Kubernetes provides is impeccable. With the command, only you can spin tons of containers which are up always which implies the self-healing feature of Kubernetes.

  9. Kubernetes offers many perks, but one of the most outstanding of these perks is that it makes it very easy to scale horizontally. It can do that automatically. So Kubernetes can help you grow or shrink your infrastructure, based on what is needed. This can help you reduce business costs.

  10. It eliminates the need for most manual processing, you can enhance productivity and drive results. Kubernetes automates many processes, making your business much more efficient.

Kubernetes Architecture

An Overview of Kubernetes Architecture and Container Deployment - Applied  Information Sciences

  • API server - It acts as a front-end for Kubernetes. the API Server supports updates, scaling, and other kinds of lifecycle orchestration by providing APIs for various types of applications. clients use the API server as a tunnel to pods, services, and nodes, and authenticate via the API server.

  • ETCD - It is a key-value store used by Kubernetes to store all the data used to manage the cluster. In this way, etcd acts as the single source of truth for all Kubernetes cluster components, responding to queries from the control plane and retrieving various parameters of the state of the containers, nodes, and pods. etcd is also used to store configuration details such as ConfigMaps, subnets, and Secrets, along with cluster state data.

  • Kubelet - It runs each node in the cluster. The agent is responsible to make sure that the containers are running on the nodes as expected. When the control plane requires a specific action to happen in a node, the kubelet receives the pod specifications through the API server and executes the action. It then ensures the associated containers are healthy and running.

  • Container Runtime - Each node runs and manages container life cycles using a container runtime engine. Kubernetes supports Open Container Initiative-compliant runtimes such as Docker.

  • Controller - It is the brain behind the orchestration. It is responsible for noticing and responding when nodes, containers or endpoints go down. The controllers make decisions to bring up new containers in such cases.

    Control Plane

    It is the platform where the Kubernetes architecture sits that controls the cluster. The control plane manages and maintains the worker nodes that hold the containerized applications.

    The components are kube-apiserver, etcd, kube-scheduler, kube-controller-manager, cloud-controller-manager.

    Write the difference between kubectl and Kubelets.

    • kubelet: Kubelet is the component that runs on all of the machines in your cluster and does things like starting PODs and containers.

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

Explain the role of the API server

Kubernetes API is the front end of the Kubernetes control plane and is how users interact with their Kubernetes cluster.

It is the interface used to manage, create, and configure Kubernetes clusters. It's how the users, external components, and parts of your cluster all communicate with each other.

At the centre of the Kubernetes control plane are the API server and the HTTP API that it exposes, allowing you to query and manipulate the state of Kubernetes objects.

WRITTEN BY Biswaraj Sahoo --AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes

Empowering communities via open source and education. Connect with me over linktree: linktr.ee/biswaraj333