From fb9f240e44a4feb19d233c216f5e64e2868c2257 Mon Sep 17 00:00:00 2001 From: leaddevops <36464863+leaddevops@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:01:19 +0530 Subject: [PATCH] Update setupk8s-single-node-cluster.sh --- scripts/setupk8s-single-node-cluster.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setupk8s-single-node-cluster.sh b/scripts/setupk8s-single-node-cluster.sh index 43e687dd..53f8df15 100644 --- a/scripts/setupk8s-single-node-cluster.sh +++ b/scripts/setupk8s-single-node-cluster.sh @@ -33,7 +33,7 @@ prepare_node() { } create_cluster() { - kubeadm init --cri-socket unix:///var/run/cri-dockerd.sock --ignore-preflight-errors=all + sudo kubeadm init --cri-socket unix:///var/run/cri-dockerd.sock --ignore-preflight-errors=all if [ $? -eq 0 ];then echo "kuberenetes master initilized successfully" @@ -43,7 +43,7 @@ create_cluster() { if [ -f $HOME/.kube/config ];then - sudo kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.1/manifests/calico.yaml + kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.1/manifests/calico.yaml mnodename=`kubectl get nodes | grep control-plane | awk '{print $1}'` kubectl taint node $mnodename node-role.kubernetes.io/control-plane:NoSchedule-