Configure Ubuntu’S Ip Range For Network Sharing With Kubernetes

ubuntu
networking
k8s
nmcli
ipv4
ip range
conflict resolution
This article provides a solution to avoid conflicts with k8s routing tables by adjusting Ubuntu’s default IP range for network sharing. It explains how to use `nmcli` to modify the device’s IPv4 address and describes the process of unplugging and replugging the cable from the client side.
Published

July 26, 2024


Change default IP range settings for network sharing

When use network sharing along with k8s things could go wrong. Ubuntu uses 10.42.0.1/24 which interferes with k8s routing table. It has a larger metric value so the network will be shadowed.

To fix it you do not use ip route or ip addr. You use nmcli.

nmcli # check all connections
nmcli device modify <shared_device> ipv4.addr <non_conflict_ip_range>

Remember to unplug and replug the cable from client side.