Kubernetes Components
- Refer Here for kubernetes master and node components
- K8s cluster is collection of nodes
- Nodes are classified as
- Master node
- nodes (Workers)
- K8s is controlled by master nodes so the components in master are referred as control plane components
- Control plane (master) components
- kube-apiserver:
- Front end of k8s
- All communications with in cluster
- etcd:
- Highly available key-value store
- memory of k8s cluster
- kube-scheduler:
- Scheduling newly created pods on the nodes
- kube-controller-manager:
- Responsible for maintaining desired state
- Kube-controller manager has the following controllers
- Node controller: Responsible for noticing and responding when node goes down
- Replication Controller: Responsible for mainting the correct number of pods (desired state)
- Endpoint controller: Populating the Endpoints object
- cloud-controller manager:
- This component embeds cloud-specific control login.
- kube-apiserver:
- Node components
-
kubelet:
- agent that runs on every node in cluster.
- It recieves instructions from k8s control plane and will do the job
-
kube-proxy
- it is a network proxy that runs on each node in k8s cluster
- It maintains network rules on the node. The rules allow network communications to your pods
-
Container runtime
- Container runtime is software responsible for running containers
- k8s supports Docker, containerd, CRI-o runtime or any implementation of kubernetes CRI.
-
- Addons:
- DNS
- Web UI
- Container Resource Monitoring
- Cluster Level Logging
K8s Setup
-
K8s has many flavours/installation types
- Desktop => minikube
- Production => Refer Here
-
Since there are many ways of installing k8s, we will be using
- kubeadm
- EKS (Elastic Kubernetes Services)
- AKS (Azure Kubernetes Services)
Using Kubeadm to setup k8s cluster (Single Master)
- We will be using 3 Ubuntu 18 Linux VMS Refer Here for installation steps
- For prereq’s Refer Here
- create three vms in aws/azure with 2vpu and 2 GB of RAM at minimum
- Install Docker Runtime on all nodes by following steps from here
- Now we need to install kubeadm, kubectl Refer Here on all nodes
Next steps
- Now lets create the k8s cluster using kubeadm Refer Here