antrea icon indicating copy to clipboard operation
antrea copied to clipboard

how to change node cidr from /24 to /n

Open spyroot opened this issue 1 year ago • 2 comments

Hi Folks,

If I use ipam host-local, i.e., default Abtrea, always use /24 as block for POD. How can I change this? consider a case when the local system might have more then 255 PODs

antrea-gw0 Link encap:Ethernet  HWaddr ee:35:81:c1:f5:cf
          inet addr:100.96.5.1  Bcast:100.96.5.255  Mask:255.255.255.0
          inet6 addr: fe80::ec35:81ff:fec1:f5cf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1450  Metric:1
          RX packets:12150 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9067 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1773583 (1.7 MB)  TX bytes:3680405 (3.6 MB)
          ```

spyroot avatar Jan 31 '24 00:01 spyroot

You need to modify parameter --node-cidr-mask-size in kube-controller-manager, see https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/

wenyingd avatar Jan 31 '24 02:01 wenyingd

Thank you. Yes, I confirm the adjusted control node CIDR default mask does the trick. If guys add this in docs, i.e., logic how /24 derived. My initial understanding was that I have to use node ipam to change default behavior if a system uses default host IPam :). I note that you need to delete the node and rejoin it in order to re-mask the existing node. (in case someone have same q)

spyroot avatar Feb 04 '24 15:02 spyroot

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment, or this will be closed in 90 days

github-actions[bot] avatar May 05 '24 00:05 github-actions[bot]

issue resolved

spyroot avatar May 06 '24 12:05 spyroot