Helm/PostgreSQL: Difference between revisions
Jump to navigation
Jump to search
(Created page with " helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update && helm repo list ==Config== <syntaxhighlight lang="properties"> export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml" export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml" export KUBECONFIG="${HOME}/.kube/config" </syntaxhighlight> ==Install== {| |valign="top"| <syntaxhighlight lang="bash"> helm show values bitnami/postgresql --version=15.5.20|less helm show values bitnami/postgresql --version...") |
|||
Line 185: | Line 185: | ||
* [https://github.com/bitnami/charts/tree/main/bitnami/postgresql PostgreSQL » Bitnami » Helm Charts] | * [https://github.com/bitnami/charts/tree/main/bitnami/postgresql PostgreSQL » Bitnami » Helm Charts] | ||
* [https://bitnami.com/stack/postgresql/helm PostgreSQL » Bitnami » Package] | * [https://bitnami.com/stack/postgresql/helm PostgreSQL » Bitnami » Package] | ||
* [[Dockerized PostgreSQL|PostgreSQL » Dockerized]] | |||
* [[PostgreSQL]] | * [[PostgreSQL]] | ||
Revision as of 09:02, 16 August 2024
helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update && helm repo list
Config
export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/config"
Install
helm show values bitnami/postgresql --version=15.5.20|less
helm show values bitnami/postgresql --version=15.5.21|less
|
kubectl get ns|grep postgresql
kubectl delete ns postgresql
|
kubectl get ns|grep postgresql
kubectl create ns postgresql
|
| ||
cat <<YML | helm -n postgresql install postgresql bitnami/postgresql --version=15.5.21 -f -
---
global:
storageClass: standard
postgresql:
auth:
postgresPassword: sadaqah!
username: academia
password: sadaqah!
database: academia
YML
| ||
| ||
psql -h psql.k8s.local -p 5432 -U academia academia
psql -h psql.k8s.local -p 5432 -U postgres postgres
|
psql 'postgres://academia:@psql.k8s.local:5432/academia'
psql 'postgres://postgres:@psql.k8s.local:5432/postgres'
|
Uninstall
helm uninstall -n postgresql postgresql
kubectl delete namespace postgresql
Playground
helm -n postgresql install postgresql bitnami/postgresql --version=15.5.20
helm -n postgresql upgrade -i postgresql bitnami/postgresql --version=15.5.21
helm show values bitnami/postgresql --version=15.5.21|less
| |
| |
kubectl -n postgresql get secret postgresql -o json|jq -r '.data."postgres-password"'|base64 -d;echo
kubectl -n postgresql get secret postgresql -o json|jq -r '.data.password'|base64 -d;echo
kubectl -n postgresql exec -it svc/postgresql -c postgresql -- psql -Upostgres
kubectl -n postgresql exec -it svc/postgresql -c postgresql -- bash
kubectl -n postgresql exec -it svc/postgresql -- psql -Upostgres
| |
| |
kubectl run -i --tty --rm psql --image=alpine --restart=Never -- sh
apk --update add postgresql-client inetutils-telnet
psql -h postgresql.postgresql.svc.cluster.local -d academia -U academia
psql -h postgresql.postgresql.svc -d academia -U academia
psql -h postgresql.postgresql -d academia -U academia
| |
| |
kubectl config --kubeconfig=${HOME}/.kube/aws-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/dev-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/gcp-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/config view --flatten
| |
| |
kubectl -n postgresql delete all --all
kubectl -n postgresql delete ing --all
kubectl -n postgresql delete sts --all
|
kubectl -n postgresql delete svc --all
kubectl -n postgresql delete pvc --all
kubectl -n postgresql delete pv --all
|
| |
kubectl -n postgresql rollout history sts postgresql
kubectl -n postgresql rollout restart sts postgresql
kubectl -n postgresql rollout status sts postgresql
|
kubectl -n postgresql exec -it postgresql-0 -c postgresql -- psql -Uacademia
kubectl -n postgresql exec -it postgresql-0 -c postgresql -- psql -Upostgres
kubectl -n postgresql exec -it postgresql-0 -- bash
|
References
| ||
| ||