Skip to content

Instantly share code, notes, and snippets.

@BrandonPotter
Last active February 23, 2021 17:25
Show Gist options
  • Save BrandonPotter/48707c0149390ace71009ccfcda7343d to your computer and use it in GitHub Desktop.
Save BrandonPotter/48707c0149390ace71009ccfcda7343d to your computer and use it in GitHub Desktop.
Restart Kubernetes Master Services
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler flanneld; do
	systemctl restart $SERVICES
	systemctl enable $SERVICES
	systemctl status $SERVICES
done

restart kubelet/node services

for SERVICES in kube-proxy kubelet flanneld docker; do
    systemctl restart $SERVICES
    systemctl enable $SERVICES
    systemctl status $SERVICES
done
@jirkadanek
Copy link

Deleting all etcd content and stopping all running docker containers can also make sense, in certain situations.

rm /var/lib/etcd/ -r
docker stop `docker ps -q`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment