How to restart kubernetes master?

7/2/2018

I'd like to restart the actual Kubernetes master related processes / services.

So this would relate to kubelete / scheduler etc etc.

How can this be done?

-- Chris Stryczynski
kubernetes

1 Answer

7/2/2018

I think this should help:

for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler flanneld; do
    systemctl restart $SERVICES
    systemctl enable $SERVICES
    systemctl status $SERVICES
done

And

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

Credit for this goes to BrandonPotter/restart-kubectl-master-services

-- Crou
Source: StackOverflow