NOTE – Run this script only in Ubuntu 20.04
Following commands would help you to create 1 Master and 1 Node in same VM.
Run Following commands in Master Node
$ sudo -s
$ cd
$ git clone https://github.com/certifications-tutorials/cks-course-environment/
$ cd cks-course-environment/
$ cd cluster-setup/
$ cd latest/
$ chmod 755 install_master.sh
$ ./install_master.sh
$ kubectl get nodes
$ kubectl taint nodes --all node-role.kubernetes.io/master-
$ kubectl cluster-info
Run following commands in Worker Node
$ git clone https://github.com/certifications-tutorials/cks-course-environment/
$ cd cks-course-environment/
$ cd cluster-setup/
$ ls
$ cd latest/
$ ls
$ chmod 755 install_worker.sh
$ ./install_worker.sh
$ kubeadm join 172.31.12.163:6443 --token 22zff9.qls775ypsmn3jtkg --discovery-token-ca-cert-hash sha256:c2df87a631d2a715ca926c4247c7f51699a652a13973c1149573561d87cd26b4
Sample Code – https://github.com/certifications-tutorials/cks-course-environment/
How to download using git
$ git clone https://github.com/certifications-tutorials/cks-course-environment/
# cks-master
sudo -i
bash <(curl -s https://raw.githubusercontent.com/certifications-tutorials/cks-course-environment/master/cluster-setup/latest/install_master.sh)
# cks-worker
sudo -i
bash <(curl -s https://raw.githubusercontent.com/certifications-tutorials/cks-course-environment/master/cluster-setup/latest/install_worker.sh)
# run the printed kubeadm-join-command from the master on the worker
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND