How to connect an AWS RDS Database instance running on private PVC through kubectl How to connect an AWS RDS Database instance running on private PVC through kubectl kubernetes kubernetes

How to connect an AWS RDS Database instance running on private PVC through kubectl


If you dont want to use kubectl you can use postgress client pod setup in EKS cluster full time.

Or else you can run command like this :

kubectl run postgresql-client --rm --tty -i --restart='Never' --namespace default --image bitnami/postgresql --env="PGPASSWORD=<YOUR_PASSWORD>" --command -- psql --host <YOUR_HOSTNAME=SVC_NAME_OR_IP> -U <HERE_USERNAME> 

make sure you are using the proper namespace name and service name.

Both are in the same VPC means you can direct connect over internal address or IP without creating an external service.