https://prefect.io logo
Title
p

Pedro Martins

05/24/2022, 11:02 PM
Hello! I’m trying to connect the Prefect Server running on k8s to a managed PostgreSQL in the Azure Cloud. The DB name, host and secret are provided through a key vault within a K8s secretproviderclass. I want now to make Hasura mounting the connection string and load the secrets from there. Can someone help me here?
m

Matt Drago

05/25/2022, 5:14 AM
Hey Pedro, I'm no Helm expert. I've also been playing around with the official Helm chart from Prefect over the last few days. To get the configure the Helm chart to use an external Postgresql db I used something like:
prefect-server:
  postgresql:
    useSubChart: false
    postgresqlUsername: prefect
    existingSecret: dataflow-prefect-db
    externalHostname: my-postgresdb.domain
And I created the secret in Kubernetes with the following:
kubectl create secret generic prefect-postgresql-pwd --from-literal='postgresql-password=YOUR_POSTGRES_PWD'
which I got from the Helm chart doco at https://github.com/PrefectHQ/server/tree/master/helm/prefect-server (Look down the page for the heading
Database
in the
Options
section).
:upvote: 2
p

Pedro Martins

05/30/2022, 2:59 PM
Hey @Matt Drago! Thank you for your input. Will try!
👍 1