Connect AWS kubernetes pod to AWS DB

2/28/2018

In GCP, it's really easy to connect to a DB within the GCP ecosystem via a tunnel by adding a proxy service onto the same pod and authenticating using a service account.

So, for example, to create a tunnel service to a mysql db, I'd add the following to my Deployment:

    - image: b.gcr.io/cloudsql-docker/gce-proxy
      command: ["/cloud_sql_proxy", "-credential_file=/secrets/mysql-service.json", "-instances=project:zone:db_name=tcp:3306"]
      name: "sql-proxy"
      volumeMounts:
        - name: cloud-sql-secrets
          mountPath: /secrets/
  volumes:
    - name: cloud-sql-secrets
      secret:
        secretName: mysql-service

And then connect to it via localhost


Is the same possible in AWS?
Specifically, I'd like to connect to postgres Aurora

-- Roman
amazon-web-services
kubernetes

0 Answers