Facing issue with the downstream DB connection, recently migrated Metabase App from VMs to k8s deployment

We recently migrated our Metabase application from VM based deployment to Kubernetes deployment.
Our application is working fine but we are facing issue with downstream DB connections. We have 125+ database connections to Metabase, most of them are postgres. All of the database doesn't allow connection from any source. In that case we need to edit the pg_hba.conf for all the postgres DBs with the updated CIDR of new Metabase app(deployed on k8s).
Any suggested solution to avoid to whitelisting of CIDR on the downstream DBs.

so the problem is that the DB won't allow connections from the K8s pods as they change the ips?

Yes, we need to add the CIDR on each Postgres DB's pg_hba.conf, then it is working.