At EDB, we released Cloud Native PostgreSQL 1.1.0 at the beginning of February. As a DevOps team, we continuously improve our software by incrementally introducing new features. In this way, we increase velocity and provide our customers with a working tool that will be improved and enriched on each further release (currently every two weeks).
One of the most useful features we have recently introduced is the CNP plugin for the kubectl tool. In this post, we will provide an overview of the enhancements this plugin brings to our users.
About the plugin
Based on our customers’ feedback, we designed a tool that expands our operator capabilities to ease the management of a Cloud Native PostgreSQL (CNP) cluster on Kubernetes from a user perspective.
One of the most important capabilities is the ability to show the status of a CNP cluster through the status subcommand, which will show a list of the cluster’s nodes and their conditions at any time.
The promote command has been introduced in the CNP plugin at the beginning of its implementation. In the next release, two more subcommands will be added: status and certificate.
How to install it
Installation is managed by a shell script that can be found here.
Make sure you have curl installed on your machine, then run the following command:
curl -sSfL \
sudo sh -s -- -b /usr/local/bin
Below we share a brief overview of each subcommand. Since each subcommand deserves separate analysis, we will show them in detail in the next blog posts, so make sure to keep up to date with our blog.
This command shows a PostgreSQL cluster’s status in Kubernetes, showing the instance’s health and potential ongoing operations.
kubectl cnp status [cluster] [flags]
This command promotes the specified server as a primary, performing a switchover procedure in a given CNP cluster.
kubectl cnp promote [cluster] [server] [flags]
This command creates a new Kubernetes secret containing the crypto-material needed to configure TLS with Certificate authentication access for an application to connect to the PostgreSQL cluster.
kubectl cnp certificate [secretName] [flags]
CNP plugin for kubectl is becoming a Swiss Army knife tool for administrators to manage a Cloud Native PostgreSQL cluster inside Kubernetes. We expect to implement even more features based on users’ feedback.
For more information, we recommend staying tuned for the upcoming blog posts, where subcommands will be analyzed in detail.