DEV Community

Thodoris Velmachos
Thodoris Velmachos

Posted on • Updated on

 

How to enable TLS on Postgres managed by Helm.

Hello, here is a simple way to enable TLS in your Postgres DB managed by Helm.

See the Screenshot Bellow

Image description


# As a starting point use this awesome cli-tool to create a selfsign certificate (testing only).
Ref: step certificate create (smallstep.com)

step certificate create self-signed-leaf.local leaf.crt leaf.key --profile self-signed --subtle

# Remove the password from the leaf.key
openssl -ec -in leaf.key -out leaf-decr.key

# Create Kubernetes Secrets
 kubectl create secret generic test-tls-secret --from-file=./leaf.crt --from-file=./leaf-decr.key

# Specify the necessary values to enable TLS and finally run
helm upgrade --install test-postgres bitnami/postgresql --values ./values.yaml
Enter fullscreen mode Exit fullscreen mode

I hope you like the tutorial, if you do give a thumps up! and follow me in Twitter, also you can subscribe to my Newsletter in order to avoid missing any of the upcoming tutorials.

Thank you, Cheers!!!

Top comments (0)

50 CLI Tools You Can't Live Without

>> Check out this classic DEV post <<