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.
To disable kube-proxy, use kubectl to delete the kube-proxy daemonset from kube-system namespace.
kube-proxy is a process that runs on each kubernetes node to manage network connections coming into and out of kubernetes. You don't run the command as such, but your deployment method (usually kubeadm) configures the options for it to run. Then delete the Pod.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With