13
votes

As of Kubernetes 1.2, kube-proxy is now a pod running in the kube-system namespace.

The old init script /etc/init.d/kube-proxy has been removed.

Aside from simply resetting the GCE instance, is there a good way to restart kube-proxy?

I just added an annotation to change the proxy mode, and I need to restart kube-proxy for my change to take effect.

1

1 Answers

19
votes

The kube-proxy is run as an addon pod, meaning the Kubelet will automatically restart it if it goes away. This means you can restart the kube-proxy pod by simply deleting it:

$ kubectl delete pod --namespace=kube-system kube-proxy-${NODE_NAME}

Where $NODE_NAME is the node you want to restart the proxy on (this is assuming a default configuration, otherwise kubectl get pods --kube-system should include the list of kube-proxy pods).

If the restarted kube-proxy is missing your annotation change, you may need to update the manifest file, usually found in /etc/kubernetes/manifests on the node.