Kubernetes 1.18 Caclico CNI CIDRNotAvailable message

4/13/2020

I have Kubernets 1.18 cluster with Calico CNI (v3.13.2). I was able to schedule to workload. but in the events I see CIDRNotAvailable message, coming from all nodes in the default name space.

my CIDR range is -cluster-cidr=10.236.0.0/16 in /etc/kubernetes/manifests/kube-controller-manager.yaml file.

kg events -A -w
NAMESPACE     LAST SEEN   TYPE     REASON             OBJECT                                  MESSAGE
default       4m41s       Normal   CIDRNotAvailable   node/kube01                          Node kube01 status is now: CIDRNotAvailable
default       23s         Normal   CIDRNotAvailable   node/kube02                          Node kube02 status is now: CIDRNotAvailable
default       2m56s       Normal   CIDRNotAvailable   node/kube03                          Node kube03 status is now: CIDRNotAvailable
default       4m33s       Normal   CIDRNotAvailable   node/kube04                          Node kube04 status is now: CIDRNotAvailable
default       4m1s        Normal   CIDRNotAvailable   node/kube29                          Node kube29 status is now: CIDRNotAvailable
default       94s         Normal   CIDRNotAvailable   node/kube30                          Node kube30 status is now: CIDRNotAvailable
default       3m12s       Normal   CIDRNotAvailable   node/kube31                          Node kube31 status is now: CIDRNotAvailable

Any idea why it giving this message?

Thanks SR

subnet enter image description here

enter image description here

-- sfgroups
calico
kubernetes

1 Answer

4/20/2020

I have to remove serviceSubnet from kubeadm configure and use the default one and use this subnet for POD IP podSubnet: 10.201.0.0/16. created cluster with this configurtion, Now this error stop coming, I can see all the node has CIDR subnet assigned.

kubectl get nodes -o jsonpath='{.items[*].spec.podCIDR}'
-- sfgroups
Source: StackOverflow