I want to use 10.42.0.0/16 as the cluster network CIDR. It seems that the IPPool’s cidr should be the same as “–cluster-cid” parameter of kube-controller-manager, so I have to configure IPPool’s cidr to be 10.42.0.0/16, so the IPPool should be defined as the following:
apiVersion: projectcalico.org/v3
kind: IPPool
metadata:
name: my.ippool-1
spec:
cidr: 10.42.0.0/16
ipipMode: Never
nodeSelector: all()
Another issue for me is I think I should set iptablesBackend to Auto to prefer to NFT on CentOS 8 (and also works on CentOS 7), that is:
apiVersion: crd.projectcalico.org/v1
kind: FelixConfiguration
metadata:
name: default
spec:
iptablesBackend: Auto
To create my Calico network, It is enough to only run the following two steps:
kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml
kubectl create -f file://./my-resources.yaml (which contains the IPPool and FelixConfiguration definitions.
Any problem?
Your advice is appreciated. Thanks!
Guofeng