Last active
December 31, 2018 13:39
-
-
Save krainet/b168ab361aaf203eface35ce96b93780 to your computer and use it in GitHub Desktop.
Setup K8S master node after initial setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
systemctl daemon-reload | |
systemctl restart kubelet | |
kubeadm init | |
#if you are root | |
export KUBECONFIG=/etc/kubernetes/admin.conf | |
# if no root | |
# mkdir -p $HOME/.kube | |
# sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config | |
# sudo chown $(id -u):$(id -g) $HOME/.kube/config | |
# By default master node don't execute pots but if you need to execute pods , you can do with: kubectl taint nodes --all node-role.kubernetes.io/master- | |
kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')" | |
kubectl get pods --all-namespaces |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment