Force overwrite the k8s config file in user environment in case
that the Kubernetes had ever been installed before.
Signed-off-by: Trevor Tao <trevor.tao@arm.com>
Change-Id: Ic11ac998666e97f1b5457084744f57da0436d274
Signed-off-by: Trevor Tao <trevor.tao@arm.com>
#!/bin/bash -ex
+# shellcheck source=/dev/null
# For host setup as Kubernetes master
MGMT_IP=$1
fi
mkdir -p "${HOME}/.kube"
- sudo cp /etc/kubernetes/admin.conf "${HOME}/.kube/config"
+ # shellcheck disable=SC2216
+ yes | sudo cp -rf /etc/kubernetes/admin.conf "${HOME}/.kube/config"
sudo chown "$(id -u)":"$(id -g)" "${HOME}/.kube/config"
sleep 5