I have a “homelab” (well it’s not a lab hosted at home, but on the cloud) running k3s and hosting my website, IRC and Matrix. I’m moving all of these services to Podman, since it’s easier and you don’t have to deal with the headaches of k3s.
I spent a lot of time the past months searching about Podman and couldn’t find so much information about it. I managed to get a Authentik pod up and running with Quadlet (systemd unit), and I have a basic Caddy container acting as the reverse proxy for it. These are hosted in another VPS I have, and they are running rootless.
I want to move the other services to Podman, but I’m a bit lost. Right now, I have all the Podman containers allocate specific ports on the host, and communication between Caddy and Authentik, for example, is done by specifying the local IP address of my VPS.
Is it a bad approach to do inter pod/container communication using the local host IP address? I read that you can create a network that pods/containers can use and each gets assigned its own IP from the network range, but I also read that it doesn’t go well with rootless. I started using slirp4netns, but then migrated to pasta since I had some issues with getting IPv6 with the former.
So, what would be the “correct” approach here? Create a separate network for the pods and use their assigned IP addresses, or use the local IP address from the host to communicate between pods?
I’d stick to using the host IP for communication between pods. It keeps the separation of different pods intact, makes it easier to add new services and if you ever get a second machine for containers you can continue doing it the same way just with a different IP.