Introduction to Kubernetes

Karan Singh
5 min readJun 26, 2020

--

Source: Kubernetes.com

In the field of DevOps, we all know how essential containers are. They are light and easy-to-use by the implementation of OS-level virtualization. But, to orchestrate these containers, we must require some tool. That’s where Kubernetes comes in. Kubernetes is a tool, helps us in managing, scaling and automating containerized applications. In this article, we are going to discuss about Kubernetes, concepts related to Kubernetes, and its benefits in modern day use.

Evolution of containerized applications

Evolution of software deployments over the years.

During earlier times, in traditional development, a single physical hardware ran multiple applications, without any definite boundaries or isolation. So, these multiple applications competed with each other for hardware resources. Hence, it required to run one application, on one piece of hardware. This required investment in hardware.

After that came virtualized environments. In these environments, one could run more than one virtual machine, on a single piece of hardware. So, each virtual machine could run different application, isolated from each other. However, each virtual machine required its own operating system to run the application. Each virtual machine gets its own share of virtualized hardware from the pool of available resources of the overall hardware.

Now, containerized applications are quite similar to virtualized environments, where applications run in a packaged forms, known as containers. Like virtual machines, containers have their own filesystem, CPU and memory. However, these containers do not require any guest operating systems, like they’re required in virtualized environments. Hence, containerized applications are lighter and easier to run than previous environments. These applications are portable across all cloud and OS distributions.

Why do we need Kubernetes?

We’ve seen in the previous section that, what benefits are there of using the containers to run the applications. Now, if we want to run more applications, the number of containers are going to increase. During a production environment, there will be a need to manage these containers, that are running various applications. This is important because we want minimum downtime for our applications. If whenever, any container goes down in production environment, we need another container to replace it, and that too with minimum downtime. That’s where Kubernetes comes in. It provides us with a system, that manages all these containers by taking care of scalability and fail-over for the containerized application by providing development patterns and much more.

Kubernetes was originally developed by Google in 2014. It is a open-source platform and now is maintained by Cloud Native Computing Foundation. Kubernetes is designed to work with various container tools like Docker. Many leading cloud providers like Google Cloud Platform, Amazon Web Services and Microsoft Azure, provide Kubernetes based platforms on which Kubernetes clusters can be deployed.

Kubernetes provides many functions, such as:

  1. Exposing containers on specific IP address or, using Domain Name Service. It also balances the load of the traffic coming through the network , to the container and distributes it accordingly.
  2. Allocates preferable storage options such as local storage or cloud storage to store files of the application.
  3. We can easily deploy new versions of the application in a orderly manner. Also, we can easily rollback a specific version of application.
  4. Kubernetes creates a cluster of nodes, on which containers are run. We can allocate specific set of computing resources like CPU and memory (RAM) that each container need.
  5. Kubernetes also helps in restarting the containers that fail, kill those containers which do not respond, and replaces them. It also run periodic health checks to check for the health of all the containers.

Components of Kubernetes

Source: Kubernetes.com

When ever we need to deploy any application on Kubernetes, we have to deploy a Kubernetes cluster. A Kubernetes cluster consists a set of machines, which are known as nodes. In each cluster, there must be at least one worker node. These worker nodes host pods that act as components of application workload. All these nodes and pods are control plane by control plane. All the activities including scheduling and responding to cluster events are done by control plane.

In control plane, kube-api-server helps in exposing Kubernetes API, which acts as a front-end of this control plane. While, etcd stores and backs-up the cluster files (using key and value), kube-scheduler checks up on newly created pods, and assigns them to a specific node. Kube-controller runs multiple controller process by merging them into one single binary process. Cloud-controller helps in running controller processes, that are specific to cloud platform.

On the each node, Kubelet ensures that each node is running in cluster and containers are running on the pods. Kube-proxy maintains network rules of each container, and container runtime is container runtime software that helps in running of container.

Applications on Cloud and future

In modern day cloud platforms, most of them have facility to use Kubernetes to deploy applications. On Amazon Web Services, one can use services like Amazon EC2 (Elastic Compute Cloud), Amazon EKS (Elastic Kubernetes Service) and Amazon ECR (Elastic Container Registry). On Microsoft Azure, we can use AKS (Azure Kubernetes Service) and can use GKE (Google Kubernetes Engine) on Google Cloud Platform. Alibaba provides Cloud Container service for Kubernetes, and IBM cloud has its cloud Kubernetes service.

Containerized applications are rising in popularity each day, due to ease of their use, light weightiness (due to the absence of gust OS) and platform independence. As the number of containerized applications in the market are gonna rise, the need for Kubernetes services is also going to increase to manage these containerized applications. With immense ability to scale the application using Kubernetes and minimizing the downtime, many organizations are definitely gonna shift to using Kubernetes for running their applications instead of traditional or virtualized architectures.

--

--

Karan Singh
Karan Singh

Written by Karan Singh

Microsoft Student Partner | Samsung Brand Ambassador | Bachelors in Computer Science Student | Aviation geek | Formula One Fan

Responses (1)