Code Review
/
iec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Force overwrite the k8s config file
[iec.git]
/
src
/
foundation
/
scripts
/
k8s_master.sh
diff --git
a/src/foundation/scripts/k8s_master.sh
b/src/foundation/scripts/k8s_master.sh
index
ab9a289
..
cdcf8bc
100755
(executable)
--- a/
src/foundation/scripts/k8s_master.sh
+++ b/
src/foundation/scripts/k8s_master.sh
@@
-1,4
+1,5
@@
#!/bin/bash -ex
#!/bin/bash -ex
+# shellcheck source=/dev/null
# For host setup as Kubernetes master
MGMT_IP=$1
# For host setup as Kubernetes master
MGMT_IP=$1
@@
-25,7
+26,8
@@
if ! kubectl get nodes; then
fi
mkdir -p "${HOME}/.kube"
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
sudo chown "$(id -u)":"$(id -g)" "${HOME}/.kube/config"
sleep 5