-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from Raj-Adarsh/a4_helm_v3
chore: added notes.txt for postgres
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
######################################################### | ||
# Postgres Helm Chart | ||
######################################################### | ||
|
||
1. **Release Information** | ||
- Release Name: {{ .Release.Name }} | ||
- Namespace: {{ .Release.Namespace }} | ||
- Chart Version: {{ .Chart.Version }} | ||
- App Version: {{ .Chart.AppVersion }} | ||
|
||
2. **Service Information** | ||
- Postgres Service: `postgres-svc` | ||
- Port: `5432` | ||
|
||
3. **Accessing the Database** | ||
- To connect to the PostgreSQL database, you can use the following command: | ||
``` | ||
kubectl run -it --rm --image=postgres:14 --restart=Never pg-client -- psql -h postgres-svc -U {{ .Values.postgresql.username }} -d {{ .Values.postgresql.database }} | ||
``` | ||
- Replace `{{ .Values.postgresql.username }}` and `{{ .Values.postgresql.database }}` with the actual values from your `values.yaml`. | ||
|
||
4. **Credentials** | ||
- The PostgreSQL credentials are stored in the `postgres-credentials` secret. | ||
- You can retrieve the credentials using the following commands: | ||
``` | ||
kubectl get secret postgres-credentials -o jsonpath="{.data.POSTGRES_USER}" | base64 --decode | ||
kubectl get secret postgres-credentials -o jsonpath="{.data.POSTGRES_PASSWORD}" | base64 --decode | ||
kubectl get secret postgres-credentials -o jsonpath="{.data.POSTGRES_DB}" | base64 --decode | ||
``` | ||
|
||
5. **Persistent Volume Claims** | ||
- The PVC for PostgreSQL storage is named `postgres-storage-postgres-0`. | ||
- StorageClass: `ebs-csi-encrypted` | ||
- Size: `8Gi` | ||
|
||
6. **Scaling** | ||
- You can scale the PostgreSQL StatefulSet using the following command: | ||
``` | ||
kubectl scale statefulset postgres --replicas=<new-replica-count> -n {{ .Release.Namespace }} | ||
``` | ||
|
||
7. **Logs** | ||
- To view the logs of the PostgreSQL pod, use the following command: | ||
``` | ||
kubectl logs -f postgres-0 -n {{ .Release.Namespace }} | ||
``` | ||
|
||
8. **Upgrading the Chart** | ||
- To upgrade the Helm chart, use the following command: | ||
``` | ||
helm upgrade {{ .Release.Name }} ./postgres -f values.yaml | ||
``` | ||
|
||
9. **Uninstalling the Chart** | ||
- To uninstall the Helm chart, use the following command: | ||
``` | ||
helm uninstall {{ .Release.Name }} -n {{ .Release.Namespace }} | ||
``` | ||
|
||
Thank you for using this PostgreSQL Helm Chart! | ||
|
||
######################################################### |