ansible-role-kubernetes icon indicating copy to clipboard operation
ansible-role-kubernetes copied to clipboard

kubernetes_pod_network is not set correctly when calico cni used

Open elcomtik opened this issue 5 years ago • 5 comments

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.

elcomtik avatar Aug 21 '20 08:08 elcomtik

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

zx1986 avatar Nov 16 '20 03:11 zx1986

refs: https://github.com/geerlingguy/ansible-role-kubernetes/issues/86

zx1986 avatar Nov 17 '20 01:11 zx1986

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.

stale[bot] avatar Feb 15 '21 04:02 stale[bot]

Still not solved

elcomtik avatar Feb 15 '21 06:02 elcomtik

This issue is no longer marked for closure.

stale[bot] avatar Feb 15 '21 06:02 stale[bot]

crosslink: https://github.com/geerlingguy/ansible-role-kubernetes/issues/86#issuecomment-1302780074

imho this can be closed

rdxmb avatar Nov 03 '22 23:11 rdxmb