TopGit tracks cockroachdb/cockroach-operator on GitHub. The project has 319 stars. k8s operator for CRDB
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Deprecation notice: The CockroachDB public Kubernetes Operator and crdb.cockroachlabs.com/v1alpha1 APIs are deprecated. See the Kubernetes deprecation notice for details and migration guidance.
The CockroachDB Kubernetes Operator deploys CockroachDB on a Kubernetes cluster. You can use the Operator to manage the configuration of a running CockroachDB cluster, including:
Authenticating certificates
Configuring resource requests and limits
Scaling the cluster
Performing a rolling upgrade
Build Status
GKE Nightly:
OpenShift Nightly:
Limitations
The Operator currently runs on GKE. VMware Tanzu, EKS, and AKS have not been tested.
The Operator does not yet support multiple Kubernetes clusters for multi-region deployments.
Migrating from a deployment using the Helm Chart to the Operator has not been defined or tested.
The Operator does not yet automatically create an ingress object.
The Operator has not been tested with Istio.
Prerequisites
Kubernetes 1.18 or higher
kubectl
A GKE cluster (n2-standard-4 is the minimum requirement for testing)
Install the Operator
Apply the custom resource definition (CRD) for the Operator:
Apply the Operator manifest. By default, the Operator is configured to install in the cockroach-operator-system
namespace. To use the Operator in a custom namespace, download the Operator
manifest and edit all
instances of namespace: cockroach-operator-system to specify your custom namespace. Then apply this version of the
manifest to the cluster with kubectl apply -f {local-file-path} instead of using the command below.
NAME READY STATUS RESTARTS AGE
cockroach-operator-6f7b86ffc4-9ppkv 1/1 Running 0 54s
Start CockroachDB
Download the example.yaml custom resource.
Note: The latest stable CockroachDB release is specified by default in image.name.
Resource requests and limits
By default, the Operator allocates 2 CPUs and 8Gi memory to CockroachDB in the Kubernetes pods. These resources are appropriate for n2-standard-4 (GCP) and m5.xlarge (AWS) machines.
On a production deployment, you should modify the resources.requests object in the custom resource with values appropriate for your workload. For details, see the CockroachDB documentation.
Certificate signing
The Operator generates and approves 1 root and 1 node certificate for the cluster.
Apply the custom resource
Apply example.yaml:
kubectl create -f example.yaml
Check that the pods were created:
kubectl get pods
NAME READY STATUS RESTARTS AGE
cockroach-operator-6f7b86ffc4-9t9zb 1/1 Running 0 3m22s
cockroachdb-0 1/1 Running 0 2m31s
cockroachdb-1 1/1 Running 0 102s
cockroachdb-2 1/1 Running 0 46s
Each pod should have READY status soon after being created.
Access the SQL shell
To use the CockroachDB SQL client, first launch a secure pod running the cockroach binary.
Note: Due to a known issue, automatic pruning of PVCs is currently disabled by default. This means that after decommissioning and removing a node, the Operator will not remove the persistent volume that was mounted to its pod. If you plan to eventually scale up the cluster after scaling down, you will need to manually delete any PVCs that were orphaned by node removal before scaling up. For more information, see the documentation.
To scale the cluster up and down, modify nodes in the custom resource. For details, see the CockroachDB documentation.
Do not scale down to fewer than 3 nodes. This is considered an anti-pattern on CockroachDB and will cause errors.
Note: You must scale by updating the nodes value in the Operator configuration. Using kubectl scale statefulset <cluster-name> --replicas=4 will result in new pods immediately being terminated.
Upgrade the CockroachDB cluster
Perform a rolling upgrade by changing image.name in the custom resource. For details, see the CockroachDB documentation.
Note: If you want to delete the persistent volumes and free up the storage used by CockroachDB, be sure you have a backup copy of your data. Data cannot be recovered once the persistent volumes are deleted. For more information, see the Kubernetes documentation.
Releases
We have a few phases to our releases. The first involves creating a new branch, updating the version, and then getting a
PR merged into master with all of the generated files.
Subsequent steps will need to be carried out in TeamCity and RedHat Connect.
Creating a new release PR
From a clean, up-to-date master (seriously...check), run the following where <version> is the desired new version
(e.g. 2.2.0).
Commit the changes with the message Bump version to <version>.
Push to a new branch on origin (that wasn't automated)
Tag the release
After the PR is merged run the following to create the tag (you'll need to be a member of CRL to do this).
git tag v$(cat version.txt)
git push upstream v$(cat version.txt)
Run Release Automation
From here, the rest of the release process is done with TeamCity. A CRL team member will need to perform some manual
steps in RedHat Connect as well. Ping one of us in Slack for info.
How active is development on cockroachdb/cockroach-operator?
The most recent commit recorded on cockroachdb/cockroach-operator was 4 days ago, based on the GitHub push timestamp. The repository has 104 forks — one of the better signals of community interest.
How many stars does cockroachdb/cockroach-operator have?
cockroachdb/cockroach-operator has 319 GitHub stars — refresh the page for the live number, or check github.com/cockroachdb/cockroach-operator. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is cockroachdb/cockroach-operator open source?
Yes — cockroachdb/cockroach-operator ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/cockroachdb/cockroach-operator.
What is cockroachdb/cockroach-operator?
cockroachdb/cockroach-operator (cockroachdb/cockroach-operator) is a Go project on GitHub. From the project's own README: k8s operator for CRDB
Where do I read more about cockroachdb/cockroach-operator?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/cockroachdb/cockroach-operator is the definitive source.
Read full README in the tab above.
Curious whether cockroach-operator is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about cockroach-operator.