Skip to content

Commit 739c828

Browse files
committed
Address remainder of Ryan's comments
1 parent d8b4bca commit 739c828

12 files changed

+1000
-848
lines changed

src/current/_includes/v25.2/sidebar-data/self-hosted-deployments.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
]
172172
},
173173
{
174-
"title": "Deploy with Kubernetes Operator",
174+
"title": "Deploy in Kubernetes with CockroachDB Operator",
175175
"items": [
176176
{
177177
"title": "Overview",
@@ -180,30 +180,30 @@
180180
]
181181
},
182182
{
183-
"title": "Cluster Deployment",
183+
"title": "CockroachDB Operator Deployment Guide",
184184
"urls": [
185185
"/${VERSION}/deploy-cockroachdb-with-kubernetes-operator.html"
186186
]
187187
},
188188
{
189-
"title": "Migrate from existing Kubernetes deployments",
189+
"title": "Migrate from Other Kubernetes Deployments",
190190
"items": [
191191
{
192-
"title": "Helm StatefulSet migration",
192+
"title": "Migrate from Helm StatefulSet",
193193
"urls": [
194194
"/${VERSION}/migrate-cockroachdb-kubernetes-helm.html"
195195
]
196196
},
197197
{
198-
"title": "Legacy operator migration",
198+
"title": "Migrate from Public Operator",
199199
"urls": [
200200
"/${VERSION}/migrate-cockroachdb-kubernetes-operator.html"
201201
]
202202
}
203203
]
204204
},
205205
{
206-
"title": "Operate on Kubernetes",
206+
"title": "Operate CockroachDB with Kubernetes",
207207
"items": [
208208
{
209209
"title": "Pod Scheduling",
Lines changed: 35 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Resource Management with the Kubernetes Operator
3-
summary: Allocate CPU, memory, and storage resources for a cluster deployed with the Kubernetes Operator.
2+
title: Resource Management with the CockroachDB Operator
3+
summary: Allocate CPU, memory, and storage resources for a cluster deployed with the CockroachDB operator.
44
toc: true
55
toc_not_nested: true
66
secure: true
@@ -25,7 +25,7 @@ You can set the CPU and memory resources allocated to the CockroachDB container
2525

2626
Specify CPU and memory values in `cockroachdb.crdbCluster.resources.limits` and `cockroachdb.crdbCluster.resources.requests` in the values file used to [deploy the cluster](deploy-cockroachdb-with-kubernetes-operator.html#initialize-the-cluster):
2727

28-
~~~yaml
28+
~~~ yaml
2929
cockroachdb:
3030
crdbCluster:
3131
resources:
@@ -39,11 +39,12 @@ cockroachdb:
3939

4040
Apply the new settings to the cluster:
4141

42-
```shell
43-
$ helm upgrade --reuse-values $CRDBCLUSTER ./cockroachdb-parent/charts/cockroachdb --values ./cockroachdb-parent/charts/cockroachdb/values.yaml -n $NAMESPACE
44-
```
42+
{% include_cached copy-clipboard.html %}
43+
~~~ shell
44+
helm upgrade --reuse-values $CRDBCLUSTER ./cockroachdb-parent/charts/cockroachdb --values ./cockroachdb-parent/charts/cockroachdb/values.yaml -n $NAMESPACE
45+
~~~
4546

46-
We recommend using identical values for `resources.requests` and `resources.limits`. When setting the new values, note that not all of a pod's resources will be available to the CockroachDB container. This is because a fraction of the CPU and memory is reserved for Kubernetes.
47+
Cockroach Labs recommends using identical values for `resources.requests` and `resources.limits`. When setting the new values, note that not all of a pod's resources will be available to the CockroachDB container. This is because a fraction of the CPU and memory is reserved for Kubernetes.
4748

4849
{{site.data.alerts.callout_info}}
4950
If no resource limits are specified, the pods will be able to consume the maximum available CPUs and memory. However, to avoid overallocating resources when another memory-intensive workload is on the same instance, always set resource requests and limits explicitly.
@@ -55,15 +56,15 @@ For more information on how Kubernetes handles resources, see the [Kubernetes do
5556

5657
Each CockroachDB node reserves a portion of its available memory for its cache and for storing temporary data for SQL queries. For more information on these settings, see the [Production Checklist](recommended-production-settings.html#cache-and-sql-memory-size).
5758

58-
The Kubernetes operator dynamically sets cache size and SQL memory size each to 25% (the recommended percentage) of the available memory, which depends on the memory request and limit you [specified](#memory-and-cpu) for your configuration. These values can be modified by adding the `cache` or `max-sql-memory` fields to `cockroachdb.crdbCluster.flags`, which is equivalent to appending `--cache` or `--max-sql-memory` as [cockroach start flags](cockroach-start.html#flags).
59+
The CockroachDB operator dynamically sets cache size and SQL memory size each to 25% (the recommended percentage) of the available memory, which depends on the memory request and limit you [specified](#memory-and-cpu) for your configuration. These values can be modified by adding the `cache` or `max-sql-memory` fields to `cockroachdb.crdbCluster.flags`, which is equivalent to appending `--cache` or `--max-sql-memory` as [cockroach start flags](cockroach-start.html#flags).
5960

6061
## Persistent storage
6162

6263
When you start your cluster, Kubernetes dynamically provisions and mounts a persistent volume into each pod. For more information on persistent volumes, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/persistent-volumes/).
6364

6465
The storage capacity of each volume is set in `cockroachdb.crdbCluster.dataStore.volumeClaimTemplate.spec.resources` in the values file used to [deploy the cluster](deploy-cockroachdb-with-kubernetes-operator.html#initialize-the-cluster):
6566

66-
```yaml
67+
~~~ yaml
6768
cockroachdb:
6869
crdbCluster:
6970
dataStore:
@@ -72,7 +73,7 @@ cockroachdb:
7273
resources:
7374
requests:
7475
storage: "10Gi"
75-
```
76+
~~~
7677

7778
You should provision an appropriate amount of disk storage for your workload. For recommendations on this, see the [Production Checklist](recommended-production-settings.html#storage).
7879

@@ -82,7 +83,7 @@ If you discover that you need more capacity, you can expand the persistent volum
8283

8384
Specify a new volume size in the values file used to [deploy the cluster](deploy-cockroachdb-with-kubernetes-operator.html#initialize-the-cluster):
8485

85-
```yaml
86+
~~~ yaml
8687
cockroachdb:
8788
crdbCluster:
8889
dataStore:
@@ -91,79 +92,44 @@ cockroachdb:
9192
resources:
9293
requests:
9394
storage: "100Gi"
94-
```
95+
~~~
9596

9697
Apply the new settings to the cluster:
9798

98-
```shell
99-
$ helm upgrade --reuse-values $CRDBCLUSTER ./cockroachdb-parent/charts/cockroachdb --values ./cockroachdb-parent/charts/cockroachdb/values.yaml -n $NAMESPACE
100-
```
99+
{% include_cached copy-clipboard.html %}
100+
~~~ shell
101+
helm upgrade --reuse-values $CRDBCLUSTER ./cockroachdb-parent/charts/cockroachdb --values ./cockroachdb-parent/charts/cockroachdb/values.yaml -n $NAMESPACE
102+
~~~
101103

102-
The Operator updates all nodes and triggers a rolling restart of the pods with the new storage capacity.
104+
The CockroachDB operator updates all nodes and triggers a rolling restart of the pods with the new storage capacity.
103105

104106
To verify that the storage capacity has been updated, run `kubectl get pvc` to view the persistent volume claims (PVCs). It will take a few minutes before the PVCs are completely updated.
105107

106108
## Network ports
107109

108-
The Operator separates network traffic into three ports:
109-
110-
<table>
111-
<tr>
112-
<th>Protocol
113-
</td>
114-
<td><strong>Default</strong>
115-
</td>
116-
<td><strong>Description</strong>
117-
</td>
118-
<td><strong>Custom Resource Field</strong>
119-
</td>
120-
</tr>
121-
<tr>
122-
<td>gRPC
123-
</td>
124-
<td>26258
125-
</td>
126-
<td>Used for node connections
127-
</td>
128-
<td><code>service.ports.grpc</code>
129-
</td>
130-
</tr>
131-
<tr>
132-
<td>HTTP
133-
</td>
134-
<td>8080
135-
</td>
136-
<td>Used to <a href="ui-overview.html#db-console-access">access the DB Console</a>
137-
</td>
138-
<td><code>service.ports.http</code>
139-
</td>
140-
</tr>
141-
<tr>
142-
<td>SQL
143-
</td>
144-
<td>26257
145-
</td>
146-
<td>Used for SQL shell access
147-
</td>
148-
<td><code>service.ports.sql</code>
149-
</td>
150-
</tr>
151-
</table>
152-
153-
Specify alternate port numbers in `cockroachdb.crdbCluster.service.ports` of the Operator's [custom resource](deploy-cockroachdb-with-kubernetes-operator.html#initialize-the-cluster) (for example, to match the default port `5432` on PostgreSQL):
154-
155-
```yaml
110+
The CockroachDB operator separates network traffic into three ports:
111+
112+
| Protocol | Default Port| Description | Custom Resource Field |
113+
|------------|-------------|-------------------------------|----------------------------------|
114+
| gRPC | 26258 | Used for node connections | service.ports.grpc |
115+
| HTTP | 8080 | Used to access the DB Console | service.ports.http |
116+
| SQL | 26257 | Used for SQL shell access | service.ports.sql |
117+
118+
Specify alternate port numbers in `cockroachdb.crdbCluster.service.ports` of the CockroachDB operator's [custom resource](deploy-cockroachdb-with-kubernetes-operator.html#initialize-the-cluster) (for example, to match the default port `5432` on PostgreSQL):
119+
120+
~~~ yaml
156121
cockroachdb:
157122
crdbCluster:
158123
service:
159124
ports:
160125
sql: 5432
161-
```
126+
~~~
162127

163128
Apply the new settings to the cluster:
164129

165-
```shell
166-
$ helm upgrade --reuse-values $CRDBCLUSTER ./cockroachdb-parent/charts/cockroachdb --values ./cockroachdb-parent/charts/cockroachdb/values.yaml -n $NAMESPACE
167-
```
130+
{% include_cached copy-clipboard.html %}
131+
~~~ shell
132+
helm upgrade --reuse-values $CRDBCLUSTER ./cockroachdb-parent/charts/cockroachdb --values ./cockroachdb-parent/charts/cockroachdb/values.yaml -n $NAMESPACE
133+
~~~
168134

169-
The Operator updates all nodes and triggers a rolling restart of the pods with the new port settings.
135+
The CockroachDB operator updates all nodes and triggers a rolling restart of the pods with the new port settings.

0 commit comments

Comments
 (0)