1.0 KiB
GENERAR ARCHIVO
helm install pg -n dbs . --dry-run --values /home/cristian/Workspace/sapian/gitops/ssdnodes/k3s-sapian-cloud/namespaces/pgo/values.yaml > /home/cristian/Workspace/sapian/gitops/ssdnodes/k3s-sapian-cloud/namespaces/pgo/postgres-Cluster.yaml
CONNECT PG DATABASE PORT FORWARD
kubectl get pod -n dbs -o name -l postgres-operator.crunchydata.com/cluster=pg,postgres-operator.crunchydata.com/role=master
kubectl -n dbs port-forward pod/´´´pod/NOMBRE POD´´´ 5432:5432
CONNECT PG DATABASE FOR CONSOLE
PG_CLUSTER_PRIMARY_POD=$(kubectl get pod --context k3s.sapian.cloud -n dbs -o name -l postgres-operator.crunchydata.com/cluster=pg-cur,postgres-operator.crunchydata.com/role=master)
kubectl --context k3s.sapian.cloud -n dbs port-forward "${PG_CLUSTER_PRIMARY_POD}" --address 127.0.108.1 5432:5432
kubectl get secrets -n dbs pg-cur-pguser-sapian -o go-template='{{.data.uri | base64decode}}'
psql postgresql://sapian:CHANGME@127.0.108.1:5432
DROP DATABASE ncdroe;
CREATE DATABASE ncdroe ENCODING 'UTF8' owner='ncdroe';