So far, VMs had only /32 ip range for VMs and VMs did not need to route packets for other entities with ip inside. For Kubernetes CNI, we will have pods which need to send packets out of the VM to another destination in the same private subnet. In that case we need to add routes to the VM's network namespace. For creating the routes, the code execution is faster than linux taking care of device creation, so we would wait for at most 0.5 second to change the routes. Also some change were made to show the right private ipv4 address based on the VM's ipv4 netmask. If the netmask is /32, that ip is returned but in the case of bigger ranges (anything bigger than /32) we will return the nth(1) ip of the range and reserve the first one for the gateway
16 KiB
16 KiB