0

I am running 2 node cluster using vagrant, configured with kubeadm command. When I setup the cluster flannel was running on all three nodes. Now i don't see flannel running in master node. because of this overlay network is not working from master node.

Used this yaml files to configure flannel.

kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml
kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml



# kubectl get pods --all-namespaces -o wide |grep fla
kube-system   kube-flannel-ds-0d3bn                       2/2       Running   0          20m       192.168.15.102   node-01
kube-system   kube-flannel-ds-86bzs                       2/2       Running   0          20m       192.168.15.103   node-02


#  k get nodes -o wide
NAME       STATUS    AGE       VERSION   EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION
master01   Ready     26d       v1.6.2    <none>        CentOS Linux 7 (Core)   3.10.0-514.10.2.el7.x86_64
node-01    Ready     26d       v1.6.2    <none>        CentOS Linux 7 (Core)   3.10.0-514.10.2.el7.x86_64
node-02    Ready     26d       v1.6.2    <none>        CentOS Linux 7 (Core)   3.10.0-514.10.2.el7.x86_64

How can I start the flannel pod in my master node?

sfgroups
  • 18,151
  • 28
  • 132
  • 204

1 Answers1

0

I see you using RBAC, maybe there are not enough rights at a node. Try creating a clusterrolebinding with the necessary rights

$ kubectl create clusterrolebinding nodeName --clusterrole=system:node -- user=nodeName

or can use cluster-admin for testing

Arslanbekov Denis
  • 1,674
  • 12
  • 26