Experimental version. The functionality may undergo significant changes. Compatibility with future versions is not guaranteed.
Basic usage
-
Create a namespace called
pg-test
. -
Create a
Postgres
custom resource:apiVersion: managed-services.deckhouse.io/v1alpha1 kind: Postgres metadata: name: pg-test namespace: pg-test spec: postgresClassName: default instance: memory: size: 1Gi cpu: cores: 1 coreFraction: 100 persistentVolumeClaim: size: 1Gi # configuration: # max_connections: "100" instances: 1 postgresVersion: version: "17.4"
-
Wait for the cluster to be ready:
kubectl wait -n pg-test --for='jsonpath={.status.phase}="Cluster in healthy state"' postgres/pg-test
-
Obtain the database credentials from the secret
<cluster-name>-<database-name>
:kubectl get secret -n pg-test pg-test-app --template={{.data.uri}} | base64 -d