diff --git a/clr-k8s-examples/create_stack.sh b/clr-k8s-examples/create_stack.sh index da0d27a..86887ef 100755 --- a/clr-k8s-examples/create_stack.sh +++ b/clr-k8s-examples/create_stack.sh @@ -22,16 +22,16 @@ function cluster_init() { #to enable the RuntimeClass featuregate sudo -E kubeadm init --config=./kubeadm.yaml - # If this an interactive terminal then wait for user to join workers - if [ -t 0 ]; then - read -p "Join other nodes. Press enter to continue" - fi - rm -rf $HOME/.kube mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config + # If this an interactive terminal then wait for user to join workers + if [ -t 0 ]; then + read -p "Join other nodes. Press enter to continue" + fi + #Ensure single node k8s works if [ $(kubectl get nodes | wc -l) -eq 2 ]; then kubectl taint nodes --all node-role.kubernetes.io/master-