How to make Postgresql running on host accessible to pods running inside minikube vm ?
-
Make postgresql available for either all ip addresses, or for the ip address of host and minikube vm bridge. For this we need to update Postgresql configuration in file postgresql.conf by setting listen_addresses = "*"
-
Update Postgresql client authetication settings to allow minikube pod app to connect to it, by changing pg_hba.conf.
-
For above both steps, we need to know host and minikube ip addresses for the bridge they are connected through.
kubectl create secret generic database-creds --from-literal=username= --from-literal=password=
kubectl create secret generic play-app-secret --from-literal=appkey=