Deploying with external Postgres and Redis
For deployments that wish to utilize external services for the PostgreSQL and/or Redis functions, instead of the built-in components.
Configure Helm Values
To utilize external database and/or cache services in the cloud, configure the following Helm values as needed.
global:
environment:
redis_host: "<your-cache-service-connection-host>"
redis_tls:
enabled: true
skip_verify: false
postgres_host: "<your-database-service-connection-host>"
postgres_tls:
enabled: true
sslmode: "verify-full"
mtls: false # Set to true to require client certificate
chart:
postgres: false
redis: false
cnpg:
enabled: falseIf either the Postgres or Redis service TLS certificates are not automatically trusted by the host operating system, you can provide CA certificates via a Secret (see below). These will be mounted into the necessary pods and referenced by Ascent to trust the external services. You will also need to add a tls block to the following sections in your values file:
logiq-flash
flash-discovery
flash-coffee
Create TLS Secret
If you need to provide CA or client certificates for Postgres and/or Redis, create a Kubernetes Secret of type generic with any of the following keys.
pg-ca.crt- The certificate that issued the database server certificate. Required if the issuer is not in the host operating system's trust store. For example, Amazon provides a certificate bundle (global-bundle.pem) when creating a new RDS cluster. That file's contents would be the value of this key.pg-client.crt- The client certificate to be used to authenticate to the Postgres service. Required ifglobal.environment.postgres_tls.mtlsis set totrue.pg-client.key- The client key to be used to authenticate to the Postgres service. Required ifglobal.environment.postgres_tls.mtlsis set totrue.redis-ca.crt- The certificate that issued the Redis server certificate. Required if the issuer is not in the host operating system's trust store.
For example, to create the secret with the Amazon RDS bundle downloaded to the current directory:
If you are not sure whether your service endpoints are trusted by the OS or not, you can test on the host OS with the OpenSSL CLI:
If the server certificate is trusted, you will see a message like this near the end of the output:
If the certificate is not trusted, you will see a message like this:
Last updated
Was this helpful?