Friday, August 8, 2025

Kubernetes part1

Kubernetes part1

Class 85th kubernetes Part1 August 8th 

Simple to tell advanced version of docker is called kubernetes

Intro:Kubernetes short form k8s,Docker logs show Container, Kubernetes logs shows Ship wheel

Docker containers maintained by kubernetes ,Docker is containerization tool ,kubernetes orchestration tool

What case we are using docker or Kubernetes?
if any budget,low members are using docker swarm,performance modernate (no autscaling,no rollback, there is a downtime )
if budget is good, high members are used prefer Kubernetes performance high , all drawback overcome with kubernetes 

We have use docker upto create image , containers are create by k8s
how we create container in docker , in k8s we create pods
K8s Architecture:
Cluster two types of node 1.control plain (master node),2.worker node
1.Master node has 4 components ,API Server, Controller manager ,scheduler, etcd
User /Operator inform to create pod API server take the request it will go scheduler 
pod will create worker nodes ,scheduler will decide which worker node to create pod 

For ex:- Worker node1 has 3 pods ,Worker node2 has 2 pods ,so automatically scheduler decide create pod in workernode2.
based on parameter size (2cpus,4gb ram), it will choose wokernode

After decide by the scheduler inform back API server ,where to create pod , API Server info to Kubelet ,Kubelet get the image from docker ,if image exist then create the pod ,pod has container,
container has running application. after create pod send the response back kubelet to api server ,
after that api server update the data in etcd ,etcd  has complete information about pods and how many worker just like database for entire cluster , the data will store in key value format

Control manager: we have there types of control manager  ,whenever pod is deleted 
automatically it will create container
1.Node controller ,
2.Replication controller,
3.Service controller 

    

 


Kube-proxy: it will maintain the network configuration , one worker node to another worker node communicate establish the network connection.

To implement kubernetes we need create clusters 
1.Self managed cluster  (everything managed by self master server,worker node ,data..etc)
    example of using tools 
    1.minikube (single node cluster) remain all them muli mode cluster 
    2.kops
    3.kubeadm
    4.k3d
using these tool ,we can able create our own cluster 
2.Cloud managed cluster (For master node everything managed by cloud provider, we have maintainer only worker node here)
   example of using tools 
  1. AWS :EKS 
  2.Azure :AKS
  3.CGP : GKS

Single node :only one server maintained both master and worker node in the same server 
Multi node: master node separate server and work node separate server.

In realtime mulinode is using , for testing purpose we use Single node 
  
Reference document: https://mustafa-k8s.hashnode.dev/well-explained-kubernetes-architecture

--Thanks 


 





No comments:

Post a Comment