I'm using podman v3.0.2 and trying to change the subnet of an existing podman network. I searched the podman and CNI documentations, but I could not find the way. Is there any correct way to change the network of an existing podman network?
Background
I already created some containers with podman default network (subnet: 10.88.0.1/16) and want to use the subnet of it for others. I think the simplest way is changing the subnet of it and want to know it.
The way I tried
I managed to change it by the following procedures, but it does not seem officially documented. Also, I think the OS reboot is redundant and want to avoid it.
- Stop the all containers connecting to the network.
- Change
subnet
section in the CNI network file. - Reboot OS
- Start the containers stopped in the procedure1.
I used this way referred from the changing the DNS in the CNI network file in the podman documentation. https://podman.io/getting-started/network#using-dns-in-container-networks