47 lines
1014 B
Markdown
47 lines
1014 B
Markdown
# Postgres for Kube
|
|
|
|
## Docker test
|
|
|
|
```bash
|
|
docker-compose up
|
|
```
|
|
|
|
Navigate to <http://pgadmin.local>
|
|
|
|
## Deploy Postgres
|
|
|
|
```bash
|
|
# first time set the secrets flag
|
|
helm install postgres ./postgres --set secret=true
|
|
|
|
# To redeploy or upgrade
|
|
helm upgrade --install postgres ./postgres
|
|
|
|
# After uninstall secrets and pvc are not removed, reinstall without the --set secrets=true to use the old secret
|
|
```
|
|
|
|
### Get Password
|
|
|
|
```bash
|
|
echo $(kubectl get secret postgres --output=jsonpath='{.data.POSTGRES_PASSWORD}' | base64 --decode)
|
|
```
|
|
|
|
## Deploy PG Admin
|
|
|
|
### Prod
|
|
|
|
```bash
|
|
prefix=<custom prefix>
|
|
# first time set the secrets flag
|
|
helm template pgadmin ./pgadmin --set host=$prefix"pgadmin.apps.aws.e1.nwie.net" --set secret=true | kubectl apply -f -
|
|
|
|
# To redeploy or upgrade
|
|
helm template pgadmin ./pgadmin --set host=$prefix"pgadmin.apps.aws.e1.nwie.net" | kubectl apply -f -
|
|
```
|
|
|
|
### Login
|
|
|
|
```bash
|
|
echo $(kubectl get secret pgadmin --output=jsonpath='{.data.PGADMIN_DEFAULT_PASSWORD}' | base64 --decode)
|
|
```
|