Skip to content

Instantly share code, notes, and snippets.

@t04glovern t04glovern/setup.sh

Created May 1, 2020
Embed
What would you like to do?
michalgutowski/cka-lab Bootstrap
# on ckamaster1
sudo -i
apt install docker.io kubeadm=1.15.1-00 kubectl=1.15.1-00 kubelet=1.15.1-00
kubeadm init --config=kubeadm-config.yaml --upload-certs| tee kubeadm-init.out
## OUTPUT
# kubeadm join ckamaster:6443 --token 4gttsi.cpkvihy9jwb8o8aq \
# --discovery-token-ca-cert-hash sha256:c70ef81c9dd7064432a255b9f617e8c3c83b4cce64db17e2518c32b0e3aaf460
exit
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
# on ckaworker1
sudo -i
apt install docker.io kubeadm=1.15.1-00 kubectl=1.15.1-00 kubelet=1.15.1-00
kubeadm join ckamaster:6443 --token 4gttsi.cpkvihy9jwb8o8aq \
--discovery-token-ca-cert-hash sha256:c70ef81c9dd7064432a255b9f617e8c3c83b4cce64db17e2518c32b0e3aaf460
# on ckamaster1
sudo kubectl get nodes
# NAME STATUS ROLES AGE VERSION
# ckamaster1 NotReady master 4m53s v1.15.1
# ckaworker1 NotReady <none> 69s v1.15.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.