Newbie's question about CIDR and setup Calico network?

I want to use 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, so the IPPool should be defined as the following:

kind: IPPool
  name: my.ippool-1
  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:

kind: FelixConfiguration
  name: default
  iptablesBackend: Auto

To create my Calico network, It is enough to only run the following two steps:
kubectl create -f
kubectl create -f file://./my-resources.yaml (which contains the IPPool and FelixConfiguration definitions.

Any problem?

Your advice is appreciated. Thanks!


You will also need to apply/create the custom-resources.yaml. Without that (which adds a default Installation resource) the operator will not install Calico. Instead of directly creating the IPPool as you have it I would suggest adding that to the Installation in custom-resources.yaml. Check out the
installation reference for some help with that.
With operator installations the iptablesBackend is set to Auto so there is no need change/create a FelixConfiguration.

Very helpful, thanks!