Skip to content

Create public preview docs for new Kubernetes operator #19942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Aug 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1342813
Initial migration of private preview content
jhlodin Jul 15, 2025
61c403f
Apply suggestions from code review
jhlodin Aug 1, 2025
8f7ef66
Address remainder of Ryan's comments
jhlodin Aug 2, 2025
9164513
Add overview and preview note
jhlodin Aug 4, 2025
3270650
Add cross-references to new operator content
jhlodin Aug 4, 2025
26257a6
Make operator naming consistent and tokenized
jhlodin Aug 4, 2025
5157320
Add rollback process to migration guides)
jhlodin Aug 5, 2025
ac1300e
Update to localityMappings
jhlodin Aug 5, 2025
c51de92
Add podTemplate and startFlags docs
jhlodin Aug 5, 2025
8feb650
Fix broken upgrade finalization includes
jhlodin Aug 5, 2025
0bc8759
quick fixes
jhlodin Aug 5, 2025
ddfb079
Fix links
jhlodin Aug 5, 2025
446c613
Add ingress configuration
jhlodin Aug 5, 2025
afcf3f6
Adjust startFlags example
jhlodin Aug 5, 2025
2369f97
Eng comments
jhlodin Aug 6, 2025
7106f39
Michael comments
jhlodin Aug 6, 2025
9a95d15
Boilerplate grammar fix
jhlodin Aug 6, 2025
4e7da85
Address remaining Michael comments
jhlodin Aug 7, 2025
c45bf5f
Add warning about RPC downtime during Helm migration
jhlodin Aug 7, 2025
24cf6e4
Add note about overriding pod anti-affinity
jhlodin Aug 7, 2025
cf11e82
Add callout about dynamically scaling disks
jhlodin Aug 7, 2025
08f9f20
Remove undocumented fluentservers
jhlodin Aug 7, 2025
fb867fb
Clarify where to build the migration-helper
jhlodin Aug 7, 2025
a01099e
Add certManager example yaml
jhlodin Aug 7, 2025
23c1565
Florence feedback
jhlodin Aug 7, 2025
60d4b4e
Add --cascade=orphan flag info
jhlodin Aug 7, 2025
680b0cd
Michael comments
jhlodin Aug 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/current/_data/products.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ basic: Basic
standard: Standard

advanced: Advanced

public-operator: Public operator

cockroachdb-operator: CockroachDB operator
30 changes: 28 additions & 2 deletions src/current/_includes/common/upgrade/disable-auto-finalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ Either of these settings prevents automatic finalization.
{{site.data.alerts.end}}
{% endcapture %}

{% if page.path contains 'kubernetes' %}
{% if page.name == 'upgrade-cockroachdb-kubernetes.md' %}

<section class="filter-content" markdown="1" data-scope="operator">
For clusters managed by the Operator, auto-finalization is disabled and cannot be enabled. A major version upgrade is not complete until it is manually [finalized](#finalize-a-major-version-upgrade-manually). The Operator does not yet support the [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) `cluster.auto_upgrade.enabled`.

For clusters managed by the {{ site.data.products.public-operator }}, auto-finalization is disabled and cannot be enabled. A major version upgrade is not complete until it is manually [finalized](#finalize-a-major-version-upgrade-manually). The {{ site.data.products.public-operator }} does not support the [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) `cluster.auto_upgrade.enabled`.

</section>

<section class="filter-content" markdown="1" data-scope="manual">
Expand All @@ -22,6 +24,7 @@ To disable auto-finalization:

1. Connect to the cluster using the SQL shell:

{% include_cached copy-clipboard.html %}
~~~ shell
$ kubectl exec -it cockroachdb-client-secure \
-- ./cockroach sql \
Expand All @@ -45,6 +48,7 @@ To disable auto-finalization:

1. Connect to the cluster using the SQL shell:

{% include_cached copy-clipboard.html %}
~~~ shell
$ kubectl exec -it cockroachdb-client-secure \
-- ./cockroach sql \
Expand All @@ -58,6 +62,28 @@ Now, to complete a major-version upgrade, you must manually [finalize it](#final

</section>

{% else if page.name == 'upgrade-cockroachdb-operator.md' %}

By default, auto-finalization is enabled, and a major-version upgrade is finalized when all nodes have rejoined the cluster using the new `cockroach` binary. This means that by default, a major-version upgrade cannot be rolled back. Instead, you must [restore the cluster to the previous version]({% link {{ page.version.version }}/restoring-backups-across-versions.md %}#support-for-restoring-backups-into-a-newer-version).

To disable auto-finalization:

1. Connect to the cluster using the SQL shell:

{% include_cached copy-clipboard.html %}
~~~ shell
kubectl exec -it cockroachdb-client-secure \
-- ./cockroach sql \
--certs-dir=/cockroach-certs \
--host=cockroachdb-public
~~~

1. Set the [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) `cluster.auto_upgrade.enabled` to `false`.

Now, to complete a major-version upgrade, you must manually [finalize it](#finalize-a-major-version-upgrade-manually) or [roll it back](#roll-back-a-major-version-upgrade).

{{ new_flag }}

{% else %}

By default, auto-finalization is enabled, and a major-version upgrade is finalized when all nodes have rejoined the cluster using the new `cockroach` binary. This means that by default, a major-version upgrade cannot be rolled back. Instead, you must [restore the cluster to the previous version]({% link {{ page.version.version }}/restoring-backups-across-versions.md %}#support-for-restoring-backups-into-a-newer-version).
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/sidebar-all-releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
]
},
{
"title": "Kubernetes Operator",
"title": "Public Kubernetes Operator",
"urls": [
"/releases/kubernetes-operator.html"
]
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/sidebar-releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
]
},
{
"title": "CockroachDB Kubernetes Operator",
"title": "Public Kubernetes Operator",
"urls": [
"/releases/kubernetes-operator.html"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

To deploy CockroachDB {{page.version.version}}, Kubernetes 1.18 or higher is required. Cockroach Labs strongly recommends that you use a Kubernetes version that is [eligible for patch support by the Kubernetes project](https://kubernetes.io/releases/).

#### Kubernetes Operator
#### Public kubernetes Operator

- The CockroachDB Kubernetes Operator currently deploys clusters in a single region. For multi-region deployments using manual configs, see [Orchestrate CockroachDB Across Multiple Kubernetes Clusters]({% link {{ page.version.version }}/orchestrate-cockroachdb-with-kubernetes-multi-cluster.md %}).
- The {{ site.data.products.public-operator }} currently deploys clusters in a single region. For multi-region deployments using manual configs, see [Orchestrate CockroachDB Across Multiple Kubernetes Clusters]({% link {{ page.version.version }}/orchestrate-cockroachdb-with-kubernetes-multi-cluster.md %}).

- Using the Operator, you can give a new cluster an arbitrary number of [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). However, a cluster's labels cannot be modified after it is deployed. To track the status of this limitation, refer to [#993](https://github.com/cockroachdb/cockroach-operator/issues/993) in the Operator project's issue tracker.

Expand Down
13 changes: 13 additions & 0 deletions src/current/_includes/v25.2/cockroachdb-operator-recommendation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% if page.name == "kubernetes-operator.md" %}
{{ site.data.alerts.callout_success }}
The {{ site.data.products.cockroachdb-operator }} is a fully-featured Kubernetes operator that is designed for ease of deployment and scaling of both single-region and multi-region clusters. To learn more, read the [{{ site.data.products.cockroachdb-operator }} documentation]({% link v25.2/cockroachdb-operator-overview.md %}).

Cockroach Labs recommends that new deployments of CockroachDB on Kubernetes use the {{ site.data.products.cockroachdb-operator }}. To migrate an existing deployment to use the {{ site.data.products.cockroachdb-operator }}, read the [Helm]({% link v25.2/migrate-cockroachdb-kubernetes-helm.md %}) and [{{ site.data.products.public-operator }}]({% link v25.2/migrate-cockroachdb-kubernetes-operator.md %}) migration guides.
{{ site.data.alerts.end }}
{% else %}
{{ site.data.alerts.callout_success }}
The {{ site.data.products.cockroachdb-operator }} is a fully-featured Kubernetes operator that is designed for ease of deployment and scaling of multi-region clusters. To learn more, read the [{{ site.data.products.cockroachdb-operator }} documentation]({% link {{ page.version.version }}/cockroachdb-operator-overview.md %}).

Cockroach Labs recommends that new deployments of CockroachDB on Kubernetes use the {{ site.data.products.cockroachdb-operator }}. To migrate an existing deployment to use the {{ site.data.products.cockroachdb-operator }}, read the [Helm]({% link {{ page.version.version }}/migrate-cockroachdb-kubernetes-helm.md %}) and [{{ site.data.products.public-operator }}]({% link {{ page.version.version }}/migrate-cockroachdb-kubernetes-operator.md %}) migration guides.
{{ site.data.alerts.end }}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

To deploy CockroachDB {{page.version.version}}, Kubernetes 1.18 or higher is required. Cockroach Labs strongly recommends that you use a Kubernetes version that is [eligible for patch support by the Kubernetes project](https://kubernetes.io/releases/).

#### Kubernetes Operator
#### {{ site.data.products.public-operator }}

- The CockroachDB Kubernetes Operator currently deploys clusters in a single region. For multi-region deployments using manual configs, see [Orchestrate CockroachDB Across Multiple Kubernetes Clusters]({% link {{ page.version.version }}/orchestrate-cockroachdb-with-kubernetes-multi-cluster.md %}).
- The {{ site.data.products.public-operator }} deploys clusters in a single region. For multi-region deployments using manual configs, Cockroach Labs recommends using the [{{ site.data.products.cockroachdb-operator }}]({% link {{ page.version.version }}/cockroachdb-operator-overview.md %}) which is designed to support multi-region deployments. For guidance on how to force multi-region support with the {{ site.data.products.public-operator }}, see [Orchestrate CockroachDB Across Multiple Kubernetes Clusters]({% link {{ page.version.version }}/orchestrate-cockroachdb-with-kubernetes-multi-cluster.md %}).

- Using the Operator, you can give a new cluster an arbitrary number of [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). However, a cluster's labels cannot be modified after it is deployed. To track the status of this limitation, refer to [#993](https://github.com/cockroachdb/cockroach-operator/issues/993) in the Operator project's issue tracker.
- Using the {{ site.data.products.public-operator }}, you can give a new cluster an arbitrary number of [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). However, a cluster's labels cannot be modified after it is deployed. To track the status of this limitation, refer to [#993](https://github.com/cockroachdb/cockroach-operator/issues/993) in the {{ site.data.products.public-operator }} project's issue tracker.

{% unless page.name == "orchestrate-cockroachdb-with-kubernetes-multi-cluster.md" %}
#### Helm version
Expand All @@ -17,9 +17,9 @@ The CockroachDB Helm chart requires Helm 3.0 or higher. If you attempt to use an
Error: UPGRADE FAILED: template: cockroachdb/templates/tests/client.yaml:6:14: executing "cockroachdb/templates/tests/client.yaml" at <.Values.networkPolicy.enabled>: nil pointer evaluating interface {}.enabled
~~~

The CockroachDB Helm chart is currently not under active development, and no new features are planned. However, Cockroach Labs remains committed to fully supporting the Helm chart by addressing defects, providing security patches, and addressing breaking changes due to deprecations in Kubernetes APIs.
The public Helm chart is currently not under active development, and no new features are planned. However, Cockroach Labs remains committed to fully supporting the Helm chart by addressing defects, providing security patches, and addressing breaking changes due to deprecations in Kubernetes APIs.

A deprecation notice for the Helm chart will be provided to customers a minimum of 6 months in advance of actual deprecation.
A deprecation notice for the public Helm chart will be provided to customers a minimum of 6 months in advance of actual deprecation.
{% endunless %}

#### Network
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ To shut down the CockroachDB cluster:
kubectl delete -f example.yaml
~~~

1. Remove the Operator:
1. Remove the {{ site.data.products.public-operator }}:

{% include_cached copy-clipboard.html %}
~~~ shell
kubectl delete -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v{{ latest_operator_version }}/install/operator.yaml
~~~

This will delete the CockroachDB cluster being run by the Operator. It intentionally does **not** delete:
This will delete the CockroachDB cluster being run by the {{ site.data.products.public-operator }}. It intentionally does **not** delete:
- The persistent volumes that were attached to the pods, to avoid the risk of data loss. Before deleting a cluster's persistent volumes, be sure to back them up. For more information, refer to [Delete a Cluster's Persistent Volumes](#delete-a-clusters-persistent-volumes) in the Kubernetes project's documentation.
- Any secrets you may have created. For more information on managing secrets, refer to [Managing Secrets Using `kubectl`](https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-kubectl) in the Kubernetes project's documentation.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{site.data.alerts.callout_info}}
All `kubectl` steps should be performed in the [namespace where you installed the Operator]({% link {{ page.version.version }}/deploy-cockroachdb-with-kubernetes.md %}#install-the-operator). By default, this is `cockroach-operator-system`.
All `kubectl` steps should be performed in the [namespace where you installed the operator]({% link {{ page.version.version }}/deploy-cockroachdb-with-kubernetes.md %}#install-the-operator). By default, this is `cockroach-operator-system`.
{{site.data.alerts.end}}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
~~~
{% endcapture %}

1. Apply the [custom resource definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) for the Operator:
1. Apply the [custom resource definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) for the {{ site.data.products.public-operator }}:

{% include_cached copy-clipboard.html %}
~~~ shell
Expand All @@ -39,16 +39,16 @@
customresourcedefinition.apiextensions.k8s.io/crdbclusters.crdb.cockroachlabs.com created
~~~

1. By default, the Operator is configured to install in the `cockroach-operator-system` namespace and to manage CockroachDB instances for all namespaces on the cluster.<ul><li>To use these defaults, apply the Operator manifest without modifying it: {{ apply_default_operator_manifest_command }}</li><li>To change these defaults:<ol><li>Download the Operator manifest: {{ download_operator_manifest_command }}</li><li>To use a custom namespace, edit all instances of <code>namespace: cockroach-operator-system</code> with your desired namespace.</code></li><li>To limit the namespaces that will be monitored, set the <code>WATCH_NAMESPACE</code> environment variable in the <code>Deployment</code> pod spec. This can be set to a single namespace or a comma-delimited set of namespaces. When set, only those <code>CrdbCluster</code> resources in the supplied namespace(s) will be reconciled.</li><li>Apply your local version of the Operator manifest to the cluster: {{ apply_local_operator_manifest_command }}</li></ol></li></ul>
1. By default, the {{ site.data.products.public-operator }} is configured to install in the `cockroach-operator-system` namespace and to manage CockroachDB instances for all namespaces on the cluster.<ul><li>To use these defaults, apply the {{ site.data.products.public-operator }} manifest without modifying it: {{ apply_default_operator_manifest_command }}</li><li>To change these defaults:<ol><li>Download the {{ site.data.products.public-operator }} manifest: {{ download_operator_manifest_command }}</li><li>To use a custom namespace, edit all instances of <code>namespace: cockroach-operator-system</code> with your desired namespace.</code></li><li>To limit the namespaces that will be monitored, set the <code>WATCH_NAMESPACE</code> environment variable in the <code>Deployment</code> pod spec. This can be set to a single namespace or a comma-delimited set of namespaces. When set, only those <code>CrdbCluster</code> resources in the supplied namespace(s) will be reconciled.</li><li>Apply your local version of the {{ site.data.products.public-operator }} manifest to the cluster: {{ apply_local_operator_manifest_command }}</li></ol></li></ul>

1. Set your current namespace to the one used by the Operator. For example, to use the Operator's default namespace:
1. Set your current namespace to the one used by the {{ site.data.products.public-operator }}. For example, to use the {{ site.data.products.public-operator }}'s default namespace:

{% include_cached copy-clipboard.html %}
~~~ shell
$ kubectl config set-context --current --namespace=cockroach-operator-system
~~~

1. Validate that the Operator is running:
1. Validate that the operator is running:

{% include_cached copy-clipboard.html %}
~~~ shell
Expand All @@ -66,7 +66,7 @@
After a cluster managed by the Kubernetes operator is initialized, its Kubernetes labels cannot be modified. For more details, refer to [Best practices](#best-practices).
{{site.data.alerts.end}}

1. Download `example.yaml`, a custom resource that tells the Operator how to configure the Kubernetes cluster.
1. Download `example.yaml`, a custom resource that tells the operator how to configure the Kubernetes cluster.

{% include_cached copy-clipboard.html %}
~~~ shell
Expand All @@ -76,7 +76,7 @@ After a cluster managed by the Kubernetes operator is initialized, its Kubernete
By default, this custom resource specifies CPU and memory resources that are appropriate for the virtual machines used in this deployment example. On a production cluster, you should substitute values that are appropriate for your machines and workload. For details on configuring your deployment, see [Configure the Cluster](configure-cockroachdb-kubernetes.html).

{{site.data.alerts.callout_info}}
By default, the Operator will generate and sign 1 client and 1 node certificate to secure the cluster. This means that if you do not provide a CA, a `cockroach`-generated CA is used. If you want to authenticate using your own CA, [specify the generated secrets in the custom resource](secure-cockroachdb-kubernetes.html#use-a-custom-ca) **before** proceeding to the next step.
By default, the operator will generate and sign 1 client and 1 node certificate to secure the cluster. This means that if you do not provide a CA, a `cockroach`-generated CA is used. If you want to authenticate using your own CA, [specify the generated secrets in the custom resource](secure-cockroachdb-kubernetes.html#use-a-custom-ca) **before** proceeding to the next step.
{{site.data.alerts.end}}

1. Apply `example.yaml`:
Expand All @@ -86,7 +86,7 @@ After a cluster managed by the Kubernetes operator is initialized, its Kubernete
$ kubectl apply -f example.yaml
~~~

The Operator will create a StatefulSet and initialize the nodes as a cluster.
The operator will create a StatefulSet and initialize the nodes as a cluster.

~~~
crdbcluster.crdb.cockroachlabs.com/cockroachdb created
Expand Down
Loading
Loading