Skip to main content

Command Palette

Search for a command to run...

Kubernetes: The Overview

Introduction to Kubernetes

Updated
Kubernetes: The Overview
S

Highly Motivated, skilled individual with a driving passion for programming and innovation. Grounded and a solution oriented, love to work in challenging environment. I always try to keep myself updated with new emerging technologies and learn them. My intrests lies in Mathematics and Computing, always try to connect software and hardware through IOT. I always love to share my knowledge to others.

In this article, we will be understanding Kubernetes. We will understand some important aspects of Kubernetes, What is Kubernetes? Why do we need them? What problem arises with the management of Containers? How Kubernetes solves a major container managing problem?

Before we start, you must know about Dockers and Containers, working of containers and images, volumes, networking in containers, and multi-container apps.

Problem with Containers

Managing Docker containers can be challenging, especially in large-scale environments where you might have hundreds or thousands of containers running across multiple hosts and servers, which eventually are serving an application with millions of users. Some of the major challenges of managing Docker containers include:

  1. Deployment: Deploying and updating Docker containers can be time-consuming, especially when you need to update multiple containers at once. Although we have Docker Compose to rescue us from this problem, we are talking about a large number of Containers.

  2. Scaling: Scaling Docker containers can be difficult, especially if you need to scale up or down quickly in response to changes in demand. Scaling Docker containers can be challenging because it requires balancing the resources available on the host machine with the resource needs of the containers. Additionally, it can be difficult to determine the optimal number of containers to run in a production environment, as it depends on factors such as the resource requirements of the application, and the number of users accessing the application.

  3. Load balancing: Distributing traffic across multiple Docker containers can be challenging, especially if you need to do it in a way that is both efficient and fault-tolerant. In addition, load balancing refers to the distribution of incoming traffic to multiple containers running on a single host or across multiple hosts. Load across all the containers should be distributed equally, which is a very rigorous task.

  4. Monitoring: Monitoring the health and performance of Docker containers can be difficult, especially in large-scale environments where you might have hundreds or thousands of containers running. In case of an app crash, that particular needs to be replaced with a new container, which in turn is a challenging task.

    Although, we have cloud service providers like AWS which provides services like AWS ECS, which solves all these problems you are then limited to what these services provide. You have to follow the rules of these services, you will have to configure everything as defined by these services, which might not be a solution.

    In addition, if we have to switch to another cloud service provider, then we again have to rewrite the entire configuration for our apps that meet the rules of the new cloud service provider. So, these are the problems that Kubernetes solves and make the management of these containers much simpler.

    In case, if you are comfortable with these services, and your requirements meet with what these services provide, then it's okay to go with them.

    What is Kubernetes?

    Kubernetes is an open-source container orchestration system for automating the deployment, scaling, and management of containerized applications. I hope this official definition of Kubernetes, is now very easy to understand. It helps us in automatic deployment, scaling, load balancing and management of containers.

    In addition, Kubernetes is not a cloud service provider, not a service provided by a cloud service provider, it's not restricted to any service provider, not the software you run on some machine, not an alternative to Docker, and not a paid service.

    Kubernetes is an open-source project, it's a collection of objects and tools, that can be used with any cloud service provider, and work together with Dockers(Containers).

Architecture of Kubernetes

Before going further, we need to be very clear about What Kubernetes will do and don't. Following are the actions that as a user you need to do -

  1. Create the cluster and the Node instances(Worker + Master Nodes).

  2. Set up API Server, kubelet and other Kubernetes services or software on Nodes.

  3. Create other cloud provider resources that might be needed (e.g Load Balancer and File Systems.)

The following are the actions that Kubernetes will perform -

  1. Create your objects (e.g Pods and Deployments) and manage them.

  2. Monitor Pods and re-create them, scale pods, destroy them etc

  3. Kubernetes utilizes the provided cloud resources to apply your configuration and goals.

We can also think of Kubernetes is like Docker Compose for multiple machines, it's a simple analogy! But not just it.

Core Components of Kubernetes Ecosystem

  1. Cluster - A set of Node machines that are running the Containerized Applications(in Worker Nodes) or other Nodes(Master Node).

  2. Nodes - It is a physical or virtual machine with a certain hardware capacity that hosts one or multiple Pods and communicates with other cluster resources.

  3. Master Node - It contains Cluster Control Plane, managing the Pods across the Worker Nodes.

  4. Worker Node - It hosts Pods, running App Containers and their required resources.

  5. Pods - Pods hold the actual running App Containers and their required resources (e.g Volumes)

  6. Containers - These are normal Docker Containers.

  7. Services - A logical set of Pods with a unique, Pod and Container independent IP Address.

Conclusion

Kubernetes is an open-source container orchestration system for automating the deployment, scaling, and management of containerized applications. We understood what problems arise with Containers, What Kubernetes solves, and How it solves them. Problems like auto-scaling, load balancing and monitoring are solved by Kubernetes. Kubernetes is an open-source project, it's a collection of objects and tools, that can be used with any cloud service provider.

I hope from this article, you are very clear about the core concepts of Kubernetes, its terminologies and the architecture of Kubernetes. In the future articles, we will understand this by creating a cluster and running them on local machines then, all these concepts will be more clear.

Thank You!

More from this blog

Sarthak Agarwal

2 posts

Highly Motivated, skilled individual with a driving passion for programming and innovation. Grounded and a solution oriented, love to work in challenging environment. I always try to keep myself updated with new emerging technologies and learn them. My intrests lies in Mathematics and Computing, always try to connect software and hardware through IOT. I always love to share my knowledge to others