-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I have a Rocky Linux host with Podman.
• The host has a private IP (let’s say 192.168.1.1).
• There is a Caddy container running with socket activation (like example4). This container is connected to two Podman networks: caddy-grafana and caddy-prometheus.
• Grafana runs in its own container and is attached to caddy-grafana.
• Prometheus runs in its own container and is attached to caddy-prometheus.
• In the Caddyfile, I configured two domains:
• grafana.example.com → Grafana
• prometheus.example.com → Prometheus
From outside the host everything works correctly. When I open grafana.example.com or prometheus.example.com in a browser, I reach the right service.
The issue: inside the Grafana container, if I try to connect to prometheus.example.com, DNS resolves it to the host IP (192.168.1.1), but the connection doesn’t work.
How can I make containers reach each other through their FQDNs, the same way it works from outside?