How to change PodCIDR/PodCIDRs in my node

10/29/2019

I have setup a kubernete cluster with kubeadm in 2 beta metal. the cluster works well. the kubeadm command I used: sudo kubeadm init --pod-network-cidr=10.244.0.0/16

When I do the the performance test, I need to run more pods in the work node. I met a mistake, the PodCIDR in my work node is,PodCIDR: 10.244.1.0/24, so i can run 254 pods at most, although i have change the max-pod to 500.

So my question is how can i change the PodCIDR in my node. I have trid to change to /etc/kubernetes/manifests/kube-controller-manager.yaml set - --node-cidr-mask-size=16, and restart the kubelet, but it makes no effort.

-- tony
kubernetes
kubernetes-pod

1 Answer

10/29/2019

PodCIDR is managed by the CNI, depends on what CNI you're using. You might want to change the CNI config and restart every node.

Here is the reference: https://capstonec.com/help-i-need-to-change-the-pod-cidr-in-my-kubernetes-cluster/

-- Kaizhe Huang
Source: StackOverflow