I have 3 masters, several workers and Calico as cni. Pods created on masters get 172.17.0.* IPs and this is docker network. Pods on workers get IP from calico pool as it should be. calicoctl show status ok for all nodes.
Also I have same kubelet parameters and config files and I don't have any pod cidr settings there. Kube-system/calico pods are up and running and logs do not show any reason. How can I set correct cidr for pods on masters?
kubectl describe node master1 | egrep -i 'cidr|calico':
projectcalico.org/IPv4Address: 192.168.0.26/24
projectcalico.org/IPv4IPIPTunnelAddr: 10.129.40.64
PodCIDR: 10.128.0.0/24
PodCIDRs: 10.128.0.0/24
pod details:
kubectl describe po mypod | egrep -i 'master|ip'
Node: master1/192.168.0.26
IP: 172.17.0.3
IPs:
IP: 172.17.0.3
Posted community wiki based on comments for better visibility. Feel free to expand it.
The solution for the issue is to add flag --network-plugin=cni
to Kubelet startup options on the masters nodes (from the @mzv comment):
I needed to add "--network-plugin=cni" to kubelet startup options
Instructions on how to add this flag to the Kubelet can be found here .
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.