<@ULVA73B9P> How can I use external postgres db i...
# marvin-in-the-wild
s
@Marvin How can I use external postgres db installing with helm ?
m
To use an external PostgreSQL database when installing Prefect with Helm, you can follow these steps: 1. Add the Prefect Helm repository:
Copy code
helm repo add prefect <https://prefecthq.github.io/prefect-helm>
    helm repo update
2. Create a namespace:
Copy code
kubectl create namespace prefect
3. Create a Kubernetes secret for the PostgreSQL credentials:
Copy code
kubectl create secret generic postgresql-credentials \
      --namespace=prefect \
      --from-literal=username=your_postgres_username \
      --from-literal=password=your_postgres_password
4. Customize the Helm chart values: Create a file named
values.yaml
with the following contents, replacing the placeholders with your actual PostgreSQL information:
Copy code
postgresql:
      enabled: false  # Disable the default PostgreSQL installation
    externalDatabase:
      host: your_postgres_host
      port: your_postgres_port
      user: your_postgres_username
      password: your_postgres_password
      database: your_postgres_database
5. Deploy Prefect with the modified values file:
Copy code
helm install my-prefect-release prefect/prefect-server -n prefect -f values.yaml
For further details, you can refer to the following links: - Prefect Kubernetes Deployment Guide - Host Guide for Prefect