Cloud Native PostgreSQL provides a plugin for
kubectl to manage a cluster in Kubernetes.
The plugin also works with
oc in an OpenShift environment.
You can install the plugin in your system with:
Once the plugin was installed and deployed, you can start using it like this:
status command provides a brief of the current status of your cluster.
You can also get a more verbose version of the status by adding
--verbose or just
The command also supports output in
The meaning of this command is to
promote a pod in the cluster to primary, so you
can start with maintenance work or test a switch-over situation in your cluster
Clusters created using the Cloud Native PostgreSQL operator work with a CA to sign
a TLS authentication certificate.
To get a certificate, you need to provide a name for the secret to store
the credentials, the cluster name, and a user for this certificate
After the secrete it's created, you can get it using
And the content of the same in plain text using the following commands: