2024-07-26
Configure Ubuntu'S Ip Range For Network Sharing With Kubernetes

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.

1
2
3
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.

Read More