Because some of my pods get stuck, I want to recreate a DaemonSet and a few security-related resources created by Weave Net plugin during kubeadm bootstrap. I used the kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
command several times, but the pod status didn't change.
Here is the command to install Weave Net for Kubernetes cluster version 1.6+ (just to have a complete answer):
$ kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
To delete all those resources, run the following command:
$ kubectl delete -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
To have more information about the root cause of the problem, check the state of pods:
$ kubectl describe pod weave-net-xspgn
$ kubectl describe pod kube-dns-86f4d74b45-9t4mj
$ kubectl describe pod kube-proxy-2gjj4
The kubelet log can also be very helpful:
# journalctl -u kubelet