title: Connecting to a Postgres DB running in K8s (Docker Desktop)
body: <p>Is the host needed when connecting to a Postgres container behind a K8s service?</p>
  <p>I was able to connect via the sql driver using just the username, password and dbname. When using the postgres driver with GORM it fails without the host in the url.</p>
  <p>The issue is that the service IP address routing to the Postgres container is only known once creating and applying the service to the cluster. The container running code to connect to the Postgres container doesn't have access to this host variable, without hardcoding or adding the host to the secrets and reapplying the secrets file.</p>
  <p>What is the correct way to dynamically connect to the Postgres container via the K8s service from another container?</p>