mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #24324 from zjmchn/fix-vagrant-halt-up-issue
Automatic merge from submit-queue fix ./cluster/kube-up.sh failed after vagrant halt. (issue #18990)
This commit is contained in:
commit
8c24c68315
@ -36,6 +36,11 @@ ETCD_INITIAL_ADVERTISE_PEER_URLS="http://${MASTER_IP}:4380"
|
|||||||
ETCD_INITIAL_CLUSTER="flannel=http://${MASTER_IP}:4380"
|
ETCD_INITIAL_CLUSTER="flannel=http://${MASTER_IP}:4380"
|
||||||
ETCD_ADVERTISE_CLIENT_URLS="${FLANNEL_ETCD_URL}"
|
ETCD_ADVERTISE_CLIENT_URLS="${FLANNEL_ETCD_URL}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# fix the etcd boot failure issue
|
||||||
|
sed -i '/^Restart/a RestartSec=10' /usr/lib/systemd/system/etcd.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
# Enable and start etcd
|
# Enable and start etcd
|
||||||
systemctl enable etcd
|
systemctl enable etcd
|
||||||
systemctl start etcd
|
systemctl start etcd
|
||||||
|
@ -61,9 +61,17 @@ fi
|
|||||||
|
|
||||||
write-salt-config kubernetes-pool
|
write-salt-config kubernetes-pool
|
||||||
|
|
||||||
create-salt-kubelet-auth
|
# Generate kubelet and kube-proxy auth file(kubeconfig) if there is not an existing one
|
||||||
create-salt-kubeproxy-auth
|
known_kubeconfig_file="/srv/salt-overlay/salt/kubelet/kubeconfig"
|
||||||
|
if [[ ! -f "${known_kubeconfig_file}" ]]; then
|
||||||
|
create-salt-kubelet-auth
|
||||||
|
create-salt-kubeproxy-auth
|
||||||
|
else
|
||||||
|
# stop kubelet, let salt start it later
|
||||||
|
systemctl stop kubelet
|
||||||
|
fi
|
||||||
|
|
||||||
install-salt
|
install-salt
|
||||||
|
|
||||||
run-salt
|
run-salt
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user