You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alexander Morales 3b33f3d45d
add backup gitops
8 months ago
..
postgres-bk add backup gitops 8 months ago
postgres-cur add backup gitops 8 months ago
pg-PostgresCluster.yaml add backup gitops 8 months ago
postgres-s3-Secret.yaml add backup gitops 8 months ago
readme.md add backup gitops 8 months ago
sapiantools-Deployment-pg.yaml add backup gitops 8 months ago

readme.md

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';