Kubernetes
Kubernetes is an open-source container orchestration system for automating software deployment, scaling, and management
Kubernetes is an open-source container orchestration system for automating software deployment, scaling, and management
K8S is a container orchestration technology that creates, deploy and manages clusters(bunch of docker containers)
It schedules, runs and manages isolated containers which are running on virtual/physical/cloud machines
Convert isolated containers running on different H/W into cluster
All 3 clouds support Kubernetes (AWS, Azure, Google)
Advantages
Orchestration (Clustering of any no of Containers running on different H/W)
Auto-Scaling (more clients? More demand)
Auto- Healing (new containers in place of crashed containers)
Load-Balancing (Distribute client requests)
Platform Independent (Cloud/Virtualization/Physical)
Fault tolerance (Node/Pod failures)
Rollback (Going back to previous versions)
K8S Master:
Kube-api server - Interact directly with user using yaml file
Kube scheduler - Take actions on the request (Handle creation and management)
Controller manager - Makesure the state of cluster matches to its desired state
etcd - Store metadata and status of cluster
Slave:
Kubelet - Agent listen to master Port: 10255
container engine: Work with kubelet, Start/stop container, Pulling images
kube-proxy - It assigns IP address for each POD/container
kubectl - Single cloud
kubeadm - on premise
kubefed - federated
Installation
setup 3 AWS server 1 as master and 2 slaves (Min Spec: 2 core and 3GB ram for master, 1 core 1 GB ram for slave)
https://graspingtech.com/install-kubernetes-rhel-8/
Upto step 6 we need to perform in both master and slave
Step 7 should be run in master only.
After that we will get some command that we needs to be run on slave to establish connection with master
UDEMY References: Mumshad Munambeth
Create Kubernetes PODs using YAML scripts
vi filename.yaml
apiVersion: V1
kind: pod
metadata:
name: nginx
labels:
app: nginx
tier: frontend
spec:
containers:
-name: nginx
image: nginx
-name: centos
image: centos
#Note: in this YAML script "apiVersion, kind, metadata and Spec" are the mandatory fields
# How to execute: kubectl apply -f filename.yaml
IDE like "Microsoft Visual studio code" to simplify the YAML coding