Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

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

I'm trying to access remotely an AWS RDS Database instance running on private PVC through

kubectl port-forward

The RDS database public accessiblity is set to "No", also I have an EKS cluster running on the same RDS PVC, the pods and services of EKS are able to communicate with AWS RDS.

So far I have created below service

kind: Service
metadata:
  name: postgres-service
spec:
  type: ExternalName
  externalName: xxx-xxx.xxxxxxx.eu-xx-1.rds.amazonaws.com

And below is the kubectl command that I have executed

kubectl  run -it --rm --image=postgres postgres-client  -- postgres-service --host=xx-xx.xx.eu-west-1.rds.amazonaws.com  --port=5432 --username=xxx --password=xxx --dbname=xxx

and the result I get is

error: timed out waiting for the condition
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!