Postgres is... a database...? It comes with extra files to work with traefik based on the URL so no need for multple ports and all that nonsense.
- values.yaml file used for installing the database with Helm w/ default entries.
- application.yaml file used with ArgoCD to automate management of the service's database.
- certificate.yaml file used to issue the TLS certificate using Cert Manager
- Helm v3
- Kubectl
- ArgoCD
- Expose the postgres port for traefik and redeploy Traefik.
- IFF cert manager is installed, get the certificate for the postgres database.
kubectl apply -f certificate.yaml
after making modifications to the certificate file.
- Make modifications to application.yaml to fit your environment.
- Install the application and wait for the database to appear.
kubectl apply -f application.yaml
- Modify the values.yaml file to suit your environment. You can store the values file locally or remotely in a private repository.
- Add database chart to Helm.
helm repo add bitnami https://charts.bitnami.com/bitnami
- Install the database using Helm. Either leave out the
--version
parameter OR change the value to match the CHART version you require.
helm upgrade --install postgres-db bitnami/postgresql -n postgres --create-namespace -f values.yaml --version 15.5.24 --atomic
Update the application file for the service/database to use the version you want OR modify the Application in the WebUI by editing the details of the Application and change the chart version to the version you want to upgrade to.
Replay the installation steps above.
Uninstalling the application files directly does not function currently. You have to navigate to the Applications in the ArgoCD and delete the applications from there. Select 'Foreground'(preferred) or 'Background' to remove the resources OR 'Non-cascading' if you wish to uninstall the application but leave the services there. Start with the Coder Application and then move to the Database application.
- Uninstall the chart using Helm.
helm uninstall postgres-db -n postgres