On Amazon EKS, I have attached an RDS instance with private access and I'm able to access it fine from my EKS cluster. Now, for debugging, I'd like to examine the db using pgadmin. What's the simplest way to do this?
This assumes your RDS instance is connected to your cluster, but is not externally accessible.
On your EKS cluster that has access to the RDS instance, add a pgadmin pod by running:
kubectl run pgadmin --image dpage/pgadmin4 --env="PGADMIN_DEFAULT_EMAIL=admin@admin.com" --env="PGADMIN_DEFAULT_PASSWORD=logmein"
Now forward the port for this pgadmin pod:
kubectl port-forward pgadmin 8080:80
Now you can open http://localhost:8080
for full access to your RDS data. Use the username and password you set above to log in to pgadmin.
When you're done, don't forget to delete the pod:
delete pod pgadmin