Kubernetes 1.18 Caclico CNI CIDRNotAvailable消息

时间:2020-04-13 13:21:47

标签: kubernetes calico

我有带有Calico CNI(v3.13.2)的Kubernets 1.18集群。我能够安排工作量。但是在事件中,我看到CIDRNotAvailable消息来自默认名称空间中的所有节点。

我的CIDR范围是-cluster-cidr=10.236.0.0/16文件中的/etc/kubernetes/manifests/kube-controller-manager.yaml

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

知道为什么要显示此消息吗?

谢谢 SR

子网 enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

我必须从kubeadm configure中删除serviceSubnet,并使用默认配置,并将此子网用于POD IP podSubnet: 10.201.0.0/16。创建的集群具有此配置,现在此错误停止了,我可以看到所有节点都分配了CIDR子网。

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