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?

  • Asparagus0098@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 hours ago

    I looked up when pasta became the default networking backend for rootless and it seems to have been with podman 5.0. I do remember using podman 5.x versions, so I was most likely using pasta.

    The reason why I seperated each app into their own network was indeed for security. The only container with access to all the networks is the reverse proxy.

    • xinayder@infosec.pubOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      41 minutes ago

      One more question, how did you manage to get the reverse proxy to proxy your pods? I just added two containers to one, and I cannot access the containers anymore by their names. Do I need to expose their ports on the pod configuration?