Free Multi-Node Kubernetes Labs Setup for Practice
--
We will be using the labs used by https://labs.play-with-k8s.com/ for practice, and for the upcoming blogs i will be using the same labs
Let’s get started:
Click on the Start
Login With the Docker or GitHub credentials
You will receive the following page
Click on + ADD NEW INSTANCE
You will receive the following page
Copy this line with Ctrl + Ins and copied paste on the below with Shift + Ins
`kubeadm init — apiserver-advertise-address $(hostname -i) — pod-network-cidr 10.5.0.0/16`
This will create the master node
Keep a copy of the following command for adding more
kubeadm join 192.168.0.8:6443 — token co1cor.mccexoo2n0c4y0aj \
— discovery-token-ca-cert-hash sha256:849e46d58acba0dbd019238a10e7b284d8b50966e45b099f1b96aeeb8c54fce4
Add some networking by copying and pasting this the same way we did above
kubectl apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml
Now lets create more nodes , same way add some
Node 2 will be created , add node2 to the master node1 , similarly we can add more nodes to the master.
Inside node1 run the following commands, you will see that node2 is added and is getting ready
After a while it will be ready.
Now its time to deploy something in it and Exposing it to the public world
Now let’s access it from the public world copy the port 32438(in your case it may be different)
And it work !!