
CloudNativePG operator should be installed in namespace "{{ .Release.Namespace }}".
You can now create a PostgreSQL cluster with 3 nodes as follows:

cat <<EOF | kubectl apply -f -
# Example of PostgreSQL cluster
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: cluster-example
  {{if not .Values.config.clusterWide  -}}
  namespace: {{ .Release.Namespace }}
  {{- end }}
spec:
  instances: 3
  storage:
    size: 1Gi
EOF

kubectl get -A cluster

