Introduction to Kubernetes
Tags: kubernetes, docker
Published: 2023-12-27 03:33:25

Hi everyone, today I will be expanding your understanding of Kubernetes and its fundamental principles. The goal of the open-source container orchestration platform Kubernetes is to automate the deployment, scaling, and administration of applications that are containerized. Kubernetes, which was initially created by Google and is currently managed by the Cloud Native Computing Foundation (CNCF), offers a stable and adaptable framework for managing the lifecycle of applications that operate in containers.
At this point, we can discuss the reasons behind and advantages of Kubernetes use. 

Because Kubernetes solves a number of issues related to deploying, scaling, and managing containerized applications in complex settings, people and organizations utilize it for a variety of purposes. Container orchestration, scalability, high availability, declarative configuration, portability, and cost effectiveness are some of the main uses for Kubernetes.

If I were to elaborate on container orchestration, I would say that it is an essential component of deploying modern applications, particularly when considering microservices design. It entails automating containerized application deployment, scalability, and management. Although managing large-scale container deployments manually can be challenging, containers offer consistency across many environments by encapsulating an application and its dependencies. These issues are addressed by container orchestration systems such as Docker Swarm, Apache Mesos, and Kubernetes. However, docker swarm is primarily used for container orchestration.

Ok folks, let's go through the key concepts of Kubernetes. They are node, cluster,  master & worker, pod, container, service and namespace. So, now I will walk you through one by one.

![Kubernetes workflow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pmmagjelrk346mrw7ep5.png)
**Node**: In Kubernetes, a Node is a worker machine that can be virtual or physical, depending on the cluster. All Nodes are under the control plane's management. Numerous pods can exist on a single Node, and the Kubernetes control plane manages the scheduling of the pods among the cluster's Nodes automatically.

**Cluster:** A collection of machines running containerized apps is called a Kubernetes cluster. Applications that are containerized come packaged with some required services and dependencies. Compared to virtual machines, they are more versatile and lightweight. Kubernetes clusters make it easier to develop, migrate, and manage apps in this way.

Containers may operate on-premises, in the cloud, on virtual computers, and in physical environments thanks to Kubernetes clusters. Unlike virtual machines, Kubernetes containers are not limited to a particular operating system. Rather, they can run anywhere and share operating systems.
One master node and several worker nodes make up a Kubernetes cluster. Depending on the cluster, these nodes may be virtual or actual computers.

**Worker and master:** One master node and multiple worker nodes make up a Kubernetes cluster. The worker nodes are in charge of managing the containers and completing any tasks that the master node assigns them. The master node manages cluster state maintenance, application scheduling and scalability, and update implementation.

**Pod:**
![Pod](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnrwmxqv35nj9shwqec0.png)
The smallest deployable compute units that Kubernetes allows you to construct and control are called pods. A group of one or more containers with shared network and storage resources and operating instructions is referred to as a pod (as in, say, a pod of whales or a pod of peas).

**Container:** Kubernetes containers resemble virtual machines (VMs), each with its own CPU share, filesystem, process space, memory, and more. However, Kubernetes containers are considered lightweight because: they can share the Operating System (OS) among applications due to their relaxed isolation properties.

**Service:** A collection of pods is connected to an IP address and abstracted service name via Kubernetes services. Services facilitate pod-to-pod discovery and routing. Services, for instance, link the front end and back end of an application, which are both operating on different cluster deployments.

**Namespace:**

![Namespaces](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/243zbj78ok3u2x4109nz.jpg)
An organization can utilize Kubernetes namespaces to separate and classify a single cluster into several sub-clusters that can be independently managed. These clusters can each operate as separate modules where users from different modules can communicate and exchange data as needed.

So, I hope you guys got a wide understanding about Kubernetes and their core concepts. So let's deep dive into those in my next blog. Stay tuned........

Resources: 

- https://kubernetes.io/
- https://cloud.google.com/discover/what-is-container-orchestration