3

I run kubeadm init successfully on my kubernete master node. And then I run kubectl apply -f kube-flannel.yml

My understanding is that flannel needs to be installed on all nodes. However, none of online tutorial say that I need to apply kube-flannel.yml using kubectl on worker node. So I wondering do I need to do that on worker nodes? Currently my work nodes stuck at NotReady state. Or does kubelet on work node somehow get flannel info from the master and automatically deploy it?

Max Li
  • 131
  • 1

1 Answers1

2

For the best source of information you should check out the official documentation:

You can install a Pod network add-on with the following command on the control-plane node or a node that has the kubeconfig credentials:

kubectl apply -f <add-on.yaml>

You can install only one Pod network per cluster.

Once a Pod network has been installed, you can confirm that it is working by checking that the CoreDNS Pod is Running in the output of kubectl get pods --all-namespaces. And once the CoreDNS Pod is up and running, you can continue by joining your nodes.

If your network is not working or CoreDNS is not in the Running state, check out the troubleshooting guide for kubeadm.

In short, you don't have to install a Pod network add-on separately on all nodes. If your nodes are still in NotReady state than try to troubleshoot the cluster.

You may also just want to Creating a cluster with kubeadm step by step with detailed information from scratch if you don't want to dig into the problems with your current setup.