Advertisement
sandervanvugt

setting up a Kubernetes cluster

Jun 2nd, 2023
94
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 1 0
  1. ON THE CONTROL NODE:
  2.  
  3. student@control:~/kube3weeks$ history
  4. 1 git clone https://github.com/sandervanvugt/cka
  5. 2 cd cka
  6. 6 sudo ./setup-container.sh
  7. 7 ls *sh
  8. 8 sudo ./setup-kubetools.sh
  9. 9 history
  10. 10 sudo kubeadm init
  11. 11 history
  12. 12 mkdir -p $HOME/.kube
  13. 13 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  14. 14 sudo chown $(id -u):$(id -g) $HOME/.kube/config
  15. 15 kubectl get all
  16. 16 kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/tigera-operator.yaml
  17. 17 kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/custom-resources.yaml
  18. 25 kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/calico.yaml
  19. 34 kubectl get pods -n kube-system
  20. 35 kubectl get nodes
  21. 36 kubectl run testapp --image=nginx
  22. 37 history
  23.  
  24. ON THE WORKER NODES
  25. 1 git clone https://github.com/sandervanvugt/cka
  26. 2 cd cka
  27. 6 sudo ./setup-container.sh
  28. 7 ls *sh
  29. 8 sudo ./setup-kubetools.sh
  30.  
  31. ON THE WORKER NODES
  32. # check the output of the sudo kubeadm init command for the token that you should be using and run a command like this on all worker nodes
  33. 1. sudo kubeadm join 192.168.29.30:6443 --token 61bqol.kf2bh5l5vt21k865 \
  34. --discovery-token-ca-cert-hash sha256:11d644c57e53b8d5875e7389576adf18007569aa26b452e95abe055faf90d401
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement