简体   繁体   中英

How to restore accidentally deleted a kube-proxy DaemonSet in a Kubernetes cluster?

I accidentally deleted kube-proxy daemonset by using command: kubectl delete -n kube-system daemonset kube-proxy which should run kube-proxy pods in my cluster, what the best way to restore it? That's how it should look

kube-proxy 守护程序是在创建集群时创建的,因此您需要为 daemon-set 编写自己的清单,除非您有备份可以从那里恢复它。

Kubernetes allows you to reinstall kube-proxy by running the following command which install the kube-proxy addon components via the API server.

$ kubeadm init phase addon kube-proxy --kubeconfig ~/.kube/config --apiserver-advertise-address string

This will generate the output as

[addons] Applied essential addon: kube-proxy

The IP address the API Server will advertise it's listening on. If not set the default network interface will be used.

Hence kube-proxy will be reinstalled in the cluster by creating a DaemonSet and launching the pods.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM