blog-banner

Deploy CockroachDB on Kubernetes with the CockroachDB Operator

Last edited on September 10, 2025

0 minute read

    Kubernetes Operator CockroachDB SOCIAL webp

    Trusted in production for years by the team at CockroachDB Cloud, the new CockroachDB Operator brings proven automation and operational best practices to your Kubernetes deployments. 

    Moved to Public Preview in August 2025, the CockroachDB Operator is built on the same technology that powers thousands of clusters in CockroachDB Cloud. It’s been refined through months of collaboration with design partners, whose feedback inspired new features, operational improvements, and usability enhancements. 

    The result: A simpler, safer, and more flexible way to run CockroachDB in Kubernetes environments.

    A Kubernetes Operator for Distributed SQL: The origin storyCopy Icon

    Over time, more customers have asked for a way to combine the benefits of CockroachDB – strongly consistent distributed SQL with multi-region capabilities – leveraging the operational workflows they already use in Kubernetes. 

    While running CockroachDB on Kubernetes was always possible, it often meant dealing with unnecessary complexity, manual configuration, and brittle workarounds. The CockroachDB Operator removes those hurdles by:

    • simplifying and automating critical operational tasks 

    • streamlining setup 

    • making multi-region deployments easier. 

    The impact: Kubernetes users reap the full value of CockroachDB, without the operational overhead.

    What’s new and why it mattersCopy Icon

    When enterprises deploy distributed SQL databases like CockroachDB on Kubernetes, benefits include better automation, scalability, and resilience. 

    Running CockroachDB on Kubernetes has always been possible, but not always painless. Standard Kubernetes tools like StatefulSets introduce friction for CockroachDB’s distributed architecture, requiring strict pod ordering and complex workarounds just to replace a single slow or failing node. 

    Multi-region deployments could be done, but only through a patchwork of manual configurations and custom scripts. Even something as small as adding a sidecar container could mean forking manifests and maintaining your own variants.

    The CockroachDB Operator removes these roadblocks and more with features built specifically for CockroachDB in production:

    • Purpose-built for CockroachDB’s architecture Uses custom resources (CrdbNode, CrdbCluster) instead of StatefulSets, so you can replace any node without sequence or naming constraints which simplifies maintenance, speeds recovery, and reduces operational risk.

    • Multi-region made simple CockroachDB already powers geographically distributed, strongly consistent SQL clusters. The CockroachDB Operator ensures you can deploy and manage them on Kubernetes without brittle, manual setups.

    • Helm chart integration Manage operator-deployed clusters using Helm for a familiar workflow, without needing to master every detail of custom resources and pod specs.

    • Advanced customization Add or modify operator-managed containers with podTemplate to integrate monitoring, security agents, or other sidecars without rewriting manifests.

    • Hands-off zero-downtime upgrades & scaling Confidently apply updates or adjust cluster size and let the operator handle it without disrupting availability. Your team can focus on delivering value, instead of fighting fires.

    CockroachDB Operator Kubernetes

    Architecture diagram of the CockroachDB Operator on Kubernetes.

    Evolving from the earlier generation operatorCopy Icon

    We previously offered a public Kubernetes operator that was used by many customers in production. However, it had architectural limitations that made operations more complex and multi-region infeasible. 

    As a result, we prioritized launching the new CockroachDB Operator. This useful tool applies the lessons learned from years of production in CockroachDB Cloud, and is informed by in-depth partner input. 

    This new operator represents CockroachDB’s expanded, long-term commitment to Kubernetes to meet enterprise needs now and in the future. While the previous generation public operator remains available today, we will phase out its support over time.

    How do I migrate to the new CockroachDB Operator?Copy Icon

    If you’re currently using our public Helm charts or the previous public operator, our migration tool makes the move seamless. It includes rollback capabilities – try it without risk, and revert if needed.

    How to Try CockroachDB OperatorCopy Icon

    The CockroachDB Operator is supported in Public Preview. It’s tested, production-proven, and ready for evaluation, with more features to come ahead of GA later in 2025. See the documentation here for additional info.

    Frequently Asked Questions About the CockroachDB OperatorCopy Icon

    What is the CockroachDB Operator for Kubernetes? The CockroachDB Operator is a Kubernetes-native tool introduced into Public Preview in August 2025 that automates deployment, scaling, upgrades, and management of CockroachDB clusters. It’s built on the same battle-tested automation that powers thousands of clusters in CockroachDB Cloud

    How does the Operator improve running CockroachDB on Kubernetes compared to StatefulSets? Unlike StatefulSets, the Operator uses custom resources (CrdbCluster, CrdbNode) purpose-built for CockroachDB. This eliminates pod ordering constraints, speeds up recovery, and reduces operational risk when nodes fail or need replacement.

    Can I run multi-region CockroachDB clusters with the Operator? Yes. The CockroachDB Operator simplifies multi-region deployments by handling the orchestration automatically, removing the brittle manual workarounds and custom scripts required in older approaches.

    Does the Operator support Helm? Yes. You can manage operator-deployed clusters using Helm for a familiar workflow, without needing to dive deep into YAML manifests or CRD details.

    What kind of customization is possible? The Operator supports podTemplate overrides, making it easy for advanced users to add monitoring agents, security sidecars, or other integrations – without forking manifests or maintaining custom versions.

    How does the Operator handle upgrades and scaling? It provides hands-off, zero-downtime upgrades and cluster resizing. You can apply updates or scale resources without impacting availability, letting your team focus on application delivery rather than firefighting.

    What if I’m using the older CockroachDB Kubernetes operator or Helm charts? Migration is straightforward using the Operator migration tool introduced with the Public Preview. It even includes rollback capabilities so you can test the new Operator safely.

    Is the CockroachDB Operator production-ready? The new Operator is available in Public Preview today. It’s already been proven in production inside CockroachDB Cloud and will reach GA later in 2025.

    Ready to learn more about how CockroachDB Operator benefits your business? Visit here to talk to an expert.

    Try CockroachDB Today

    Spin up your first CockroachDB Cloud cluster in minutes. Start with $400 in free credits. Or get a free 30-day trial of CockroachDB Enterprise on self-hosted environments.

    Michael Wang is Director, Product Management, at Cockroach Labs. In his five years at Cockroach Labs, he has worked on projects across the Storage, KV, SQL, Server and Deployment layers to improve the Stability, Performance, Operability and Resilience of CockroachDB.