Skip to content

Commit fb9f240

Browse files
authored
Update setupk8s-single-node-cluster.sh
1 parent fdc3a11 commit fb9f240

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/setupk8s-single-node-cluster.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ prepare_node() {
3333
}
3434
create_cluster() {
3535

36-
kubeadm init --cri-socket unix:///var/run/cri-dockerd.sock --ignore-preflight-errors=all
36+
sudo kubeadm init --cri-socket unix:///var/run/cri-dockerd.sock --ignore-preflight-errors=all
3737
if [ $? -eq 0 ];then
3838
echo "kuberenetes master initilized successfully"
3939

@@ -43,7 +43,7 @@ create_cluster() {
4343

4444
if [ -f $HOME/.kube/config ];then
4545

46-
sudo kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.1/manifests/calico.yaml
46+
kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.1/manifests/calico.yaml
4747
mnodename=`kubectl get nodes | grep control-plane | awk '{print $1}'`
4848
kubectl taint node $mnodename node-role.kubernetes.io/control-plane:NoSchedule-
4949

0 commit comments

Comments
 (0)