Connect to a CloudSQL with SSL

I’m trying to add a GCP Postgre to my agent
pmm-admin add postgresql --tls --username=user --password=password --service-name=gcp-postgre gcp-postgre-dev 123.123.7.8:5432
but receiving:
Connection check failed: x509: cannot validate certificate for <IP> because it doesn't contain any IP SANs.

When I try to conect with flag --tls-skip-verify I get:
Connection check failed: pq: connection requires a valid client certificate.

But docs dont give a comand to pass a certificate in this register like was in MongoDB section.

How can I connect a Postgres with SSL secure connection to pmm?

Try to use insecure_skip_verify if you want to skip ssl check

Or

Instead of IP use DNS name. You can set static hostname on pmm server as well under /etc/hosts file

1 Like

Try to use insecure_skip_verify if you want to skip ssl check:
Connection check failed: pq: connection requires a valid client certificate.

My issue is most like conection between agent and DB.

I have a container running pmm-server and in this machine I have a pmm-agent. I need to add a CloudSQL DB to this agent, but my SQL has SSL connection. I already have my certi, but dont know how to apply it in comand pmm-admin config comand for Postgre

1 Like

[PMM-7888] Custom TLS certificates now allow SSL connections to PostgreSQL instances - Percona JIRA looks like it doesn’t has support for certificates for PG yet

1 Like