Let's Learn Kubernetes - Basics - 1
Tags: kubernetes, devops, beginners, go
Published: 2021-09-29 15:40:54

Building an application is one set of challenges that needs to be tackled, and once that is done, you have a series of new challenges. An Application needs to be Deployed, Scaled, and maintained across based on the demand. In recent times, the containerization of Apps has become an excellent means to help solve most of the mentioned challenges. Many solutions containerize and help manage and operationalize the application, but the most used of all the available solutions is Kubernetes.

Kubernetes is a container management tool that automates the deployment, scaling, and operations of an application. It has become the de facto container orchestrator, with more than 80% of companies using it in some capacity. Hence, it becomes essential for Novice & Expert DevOps Engineers, Developers, and Programmers to learn Kubernetes. Devtron brings you a collection of concepts and their most popular links/explanations to make a comprehensive guide understanding the basics of Kubernetes.

You can also check out Devtron, End-to-End Kubernetes Software Delivery Workflow here:
{% github devtron-labs/devtron no-readme %}

## An Overview

Kubernetes is a portable, extensible, open-source platform for managing containerized applications and services that facilitate declarative configuration and automation. Kubernetes provides a platform to configure, automate, and manage:

* Intelligent and balanced scheduling of containers
* Creation, deletion, and movement of containers
* Easy scaling of containers
* Monitoring and self-healing abilities

In this write-up, the author discusses challenges faced using previous server-side application management tools and how Kubernetes helps tackle these challenges. 

{% link pghildiyal/here-s-why-you-should-use-kubernetes-g9l %}

## Architecture

![Basic Kubernetes Architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xz2brmkb4q4w5o4begxq.png)

In this article, we get to see a brief overview of the Architecture of Kubernetes and the components of the Architecture such as Master, API Scheduler, Nodes, Pods, Scheduler, among others.

[A Developers Guide to Kubernetes](https://devtron.ai/blog/developers-guide-to-kubernetes/)

## Pods

The Smallest Execution Unit of Kubernetes can be considered a Pod. A pod is temporary in nature, and new ones form when one dies. Pods consist of a unique IP address, Persistent storage Volumes, Configuration Information. 

The below link explains all things Pods.

[What are Kubernetes Pods?](https://www.vmware.com/topics/glossary/content/kubernetes-pods)

## Nodes & Clusters

Node is the smallest unit of Computing Hardware in a cluster. Each Node can be considered a set of CPU and RAM resources available for Kubernetes to work.
Although working with individual nodes is useful, Kubernetes combines these resources of nodes to become a cluster. Kubernetes intelligently manage the distribution of work among the worker nodes among the Cluster.
A more detailed explanation is available in the following link about Pods, Nodes, and Clusters.

[Kubernetes 101: Pods, Nodes, Containers, and Clusters](https://medium.com/google-cloud/kubernetes-101-pods-nodes-containers-and-clusters-c1509e409e16)

## Controllers

{% youtube 55qGFj6kuOg %}

A controller is a system pod that helps in controlling the behavior of other pods. The above video gives a detailed explanation of how controllers work.

### Replicasets

With Replicasets, it is possible to run a specified number of pod replicas running at all times. The link below gives a comprehensive view of Replicasets.

[Kubernetes ReplicaSets: A Brief Introduction](https://www.bmc.com/blogs/kubernetes-replicaset/#:~:text=What%20are%20ReplicaSets%3F%20A%20ReplicaSet%20is%20one%20of,state%20of%20the%20cluster%20matches%20the%20observed%20state.%29)

### Jobs

Kubernetes Jobs are used to creating transient pods that perform specific tasks they are assigned to.

[A beginner's guide to Kubernetes Jobs and CronJobs](https://opensource.com/article/20/11/kubernetes-jobs-cronjobs)

### Schedulers

The Kubernetes Scheduler, monitoring the Object Store for unassigned Pods, will assign the Pod to a Node. Then, the Kubelet, monitoring the Object Store for assigned Pods, will execute the Pod.

[The Kubernetes Scheduler](https://dominik-tornow.medium.com/the-kubernetes-scheduler-cd429abac02f)