Create Two Ubuntu VM (MASTER AND WORKER): and SSH Into them using the link here
Install Docker Engine on both VM and enable Docker:
sudo usermod –aG docker Ubuntu
sudo chmod 777 /var/run/docker.sock
sudo systemctl start docker
sudo systemctl enable docker
sudo systemctl status docker
Installing kubelet, kubeadm and kubectl:
sudo apt-get install -y apt-transport-https ca-certificates curl gpg
Download the public signing key for the Kubernetes package repositories. The same signing key is used for all repositories so you can disregard the version in the URL:
Add the appropriate Kubernetes apt repository.
Update the apt package index, install kubelet, kubeadm and kubectl, and pin their version:
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
Enable the kubelet service before running kubeadm
sudo systemctl status kubelet
sudo systemctl status kubelet
Adding kubeadm to a network (ON THE MASTER VM ONLY)
Adding kubenetes cluser:
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Back on WORKER NODE:
Follow the same process to – Install kubelet, kubeadm and kubectl:
Join the Master and Worker with the Join Command:
Using the JOIN Command looks like this on the vm
–discovery-token-ca-cert-hash sha256:fd617bad969a4275a7a8d03c6bcb3a9a115196feb14c27ffc5371495e1dc6f84
to retrive the join command incase you didnt save it run this on Master VM
To test on Master VM:
its show node NOT READY.
Set your port network Using Calico manifest:
click here for doc info
kubectl apply -f calico.yaml
Run these commands on MASTER
kubectl get pod -A
Create a pod to TEST:
kubectl get pods
Thank You for Following and Practicing.