mirror of
https://github.com/clearlinux/cloud-native-setup.git
synced 2026-08-19 05:27:26 +00:00
Moving around to allow early exit
In case we need to exit early this would have copied the credentials into the home dir Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
This commit is contained in:
committed by
Saikrishna Edupuganti
parent
c8006ca944
commit
97f8ea2506
@@ -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-
|
||||
|
||||
Reference in New Issue
Block a user