ansible-role-kubernetes
ansible-role-kubernetes copied to clipboard
kubernetes_pod_network is not set correctly when calico cni used
I have set following vars to configure subnet for pods:
kubernetes_pod_network:
cni: 'calico'
cidr: '10.11.0.0/16'
However it gets default subnet 192.168.0.0/16
I looked to cluster info and there it looks to be set correctly:
$ kubectl cluster-info dump | grep cidr
"--allocate-node-cidrs=true",
"--cluster-cidr=10.11.0.0/16",
"--node-cidr-mask-size=24",
I looked at calicoctl for pools, and there it is not ok
$ calicoctl get ippool -o wide
NAME CIDR NAT IPIPMODE VXLANMODE DISABLED SELECTOR
default-ipv4-ippool 192.168.0.0/16 true Always Never false all()
I have very little experience with setting up k8s cluster, so I have absolutely no idea what is wrong with this role.
The problem is: the CIDR value is writing in https://docs.projectcalico.org/v3.10/manifests/calico.yaml
refs: https://github.com/geerlingguy/ansible-role-kubernetes/blob/master/defaults/main.yml#L49
refs: https://github.com/geerlingguy/ansible-role-kubernetes/issues/86
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
Still not solved
This issue is no longer marked for closure.
crosslink: https://github.com/geerlingguy/ansible-role-kubernetes/issues/86#issuecomment-1302780074
imho this can be closed