Kubernetes Fundamentals under 5 minutes

Kubernetes Fundamentals under 5 minutes

It's been a month for the last time I revised Kubernetes, let's go for a revision and one of the best free resources for Kubernetes internal functioning is Nana's Crash Course video of kubernetes that is available on YouTube.

Here are Some Key-points:

Kubernetes also known as k8s is an Open-Source container Orchestration system for automating software Deployment, scaling and management. Initially, it was designed by google, but now it is maintained by CloudNative Era

What Problems does Kubernetes solve?

- Trend from Monolith to Micro-Services

- Increased Usage of Container

- Provide a proper way of managing hundreds of containers.

- High Availability or No Downtime

- Scalability or High Performance

- Disaster Recovery - Backup & Restore

Kubernetes Architecture:

The Architecture consists of a master node, now referred to as Control Plane and Bunch of Worker Nodes.

Worker Node comprises:

- KubeLet: it's a tool through which nodes communicate with each other

- Each node has containers of different applications deployed on it, so the workload depends on the number of container

- Worker Node is the area where the actual work is happening

Master Node:

- It runs important Kubernetes processes that are absolutely necessary to run and manage the cluster properly

- One of the important processes is the API server which is the entry point to cluster

- Controller Manager which keeps track of activities in cluster

- Scheduler: Ensures Pod Placement by using the free workload of container

- Etcd: It is a kubernetes backing store which holds the current state of the kubernetes cluster. Etcd snapshot can be used to recover previous state

Pod:

- Smallest unit in kubernetes

- Provide Abstraction over container

- Usually One Application per pod

- Each Pod gets its own IP Address which helps in inter-pod Communication

- Pods are ephemeral but a new pod is created automatically with New IP Address

Deployment:

- It is like a blueprint for pods in which we specify the number of replicas we want to have

- In practice, we create deployment rather than pods

- Abstraction over pods

- It is for stateLESS apps

Service:

- Permanent IP address attached to each Pod

- Pod and Service life cycle are not connected

- For your app to be accessible through a browser, we need an external service but to protect our database from external attack, we specify the type of service on creation

Ingress:

- The URL of external Service is not practical like

192.xx.xx.x which is good for test purposes but not for the end product.

- To make your URL into something like -myapp.com-, we use Ingress

Config Map And Secrets:

- Config Map provides an external Configuration of your application

- It is only for Non-Confidential data.

- Data like Username and password are confidential data which are protected with the help of Secret.

- It stores Secret data in base 64 encoded

Volume:

- If a pod restarts, the data inside the pod is lost and the way to have data persistence in kubernetes is through Volumes

- It basically attaches physical storage on a hard drive to your pod

- Storage on a local machine or remote, outside of the K8s cluster

Minikube:

It is a local kubernetes setup focusing on making it way to learn and develop for kubernetes. It is one of the free resources to practice kubernetes and it is available for Windows, MacOs and Linux. For more Info, the following link can help:

Did you find this article valuable?

Support Pravesh's blog by becoming a sponsor. Any amount is appreciated!