Create a ConfigMap that provides the CA configuration required for PostgreSQL SSL
connections.
PostgreSQL SSL connections require CA configuration to validate server
certificates.
This configuration is provided through a trust-stores ConfigMap.
-
Create a file named
postgres-root.pem.
-
(Optional) If multiple CA entries are required, add all entries to the same
file. This is required for GCP CloudSQL deployments, where each instance can use
a different CA configuration.
-
Create the ConfigMap.
kubectl create configmap trust-stores \
--from-file=postgres-root.pem \
-n <your-namespace>
-
Reference the ConfigMap in your deployment configuration.
PostgreSQL connections use the configured trust-stores ConfigMap for SSL
validation.