how to recreate all the resources from a Weave Net manifest?

5/31/2018

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. enter image description here 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.

-- X. Wang
kubeadm
kubernetes

1 Answer

6/1/2018

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
-- VAS
Source: StackOverflow