The Couchbase Autonomous Operator 2.3.0 release provides some exciting improvements to lifecycle automation with the cao utility.  This utility improves previous configuration tools by consolidating provisioning and facilitating supportability with the addition of a self-certification feature. To get started, download the Cloud-Native Database package and unpack it to the same directory where you normally run kubectl.

Out with the old

In previous releases, the Autonomous Operator installation was performed by the cbopcfg tool.  This tool also performed other actions such as creating backup roles and template generation. As of the 2.3.0 release, all of this functionality has been deprecated within cbopcfg and moved to the cao utility.

Furthermore, the previous supportability provided by the cbopinfo utility for log and resource collection has also been deprecated. As of the 2.3.0 release, the same supportability features now exist within the cao utility, along with additional functionality for self-certification.

In with the improved

As you get started with the cao utility, you’ll find that all the old features provided in previous releases exist with similar syntax. The help menu gives an overview of the commands provided by the cao utility:

Use the create command to create both the Autonomous Operator and Admission Controller to get started.

The Autonomous Operator will be used to certify and manage the cluster you will create in the following steps.  The admission controller provides validation and verification of every resource within the Autonomous Operator ecosystem.

Testing autonomous cluster creation

Now that the Autonomous Operator is running, you can run platform certification to ensure the supportability of your environment.  For the sake of brevity, you can run a single certification test.  When preparing a cluster for production purposes, you will want to run the entire certification suite.

One-off certification can help troubleshoot a failing test or validate a particular aspect of your cluster. For instance, if you wanted to get quick feedback on the validity of your storage layer, you could run the TestPersistentVolumeCreateCluster test to verify the success of cluster creation with persistent volumes. Available tests will be listed at the start of every full certification run in case you need to reference others.

Saving cluster topology

Next, you can create a standalone cluster using the Couchbase helm chart. Since the Autonomous Operator and Admission Controller are already created, disable these deployments when installing the chart to ensure that only the Couchbase Cluster is installed:

This command creates a Couchbase Cluster consisting of 3 Pods. When all of the Pods are running, and the bucket is created, then the cao save command can be used to save the Cluster’s data topology. The save feature converts all discovered resources into native Kubernetes resource types, preserving all configuration and linkage information.

Saving cluster topology is especially beneficial for use cases involving several buckets with specific scope and collection rules for merging or restoring to additional clusters. For further information, refer to the documentation regarding save and restore functionality

Lifecycle considerations

As with any tool, understanding when and how to use this utility is important from a full end-to-end perspective. Fortunately, the cao utility is an excellent choice for any installation scenario, as it can set up both development and production scale environments.

However, it is important to note that this utility is not a full end-to-end solution for Couchbase Server Provisioning. While cao can deploy the management resources (e.g., Operator and Admission controllers), you will need to manually provision your own cluster separately.

While you may be able to mix and match the use of this tool with other installers such as helm to perform cluster installation as demonstrated above, it is recommended to avoid piecemealing installers as this may complicate the upgrade process down the road. In many ways, the power of the cao utility along with plain kubectl can be an advantage for creating modular integration and deployment pipelines that involve the basic operator deployment alongside several custom cluster configurations.

Further reading

Couchbase Autonomous Operator documentation covers all the topics that we covered above; read more about them here:


Posted by Tommie McAfee

Sr. Software Engineer for the Couchbase Cloude Native Team.

Leave a reply