From 0ac13b661e2da0fa81a4f9779cfd81ebf53d75d6 Mon Sep 17 00:00:00 2001 From: Matt Linville Date: Tue, 8 Oct 2024 16:53:28 -0700 Subject: [PATCH] Port to v24.3, v24.1, v23.2, v23.1 --- .../start-cockroachdb-helm-secure.md | 2 + .../start-cockroachdb-helm-secure.md | 2 + .../start-cockroachdb-helm-secure.md | 2 + .../start-cockroachdb-helm-secure.md | 2 + .../start-cockroachdb-local-helm-insecure.md | 65 ++++++++++++++++++- 5 files changed, 71 insertions(+), 2 deletions(-) diff --git a/src/current/_includes/v23.1/orchestration/start-cockroachdb-helm-secure.md b/src/current/_includes/v23.1/orchestration/start-cockroachdb-helm-secure.md index 4ee4a185976..a2f3ebc52b8 100644 --- a/src/current/_includes/v23.1/orchestration/start-cockroachdb-helm-secure.md +++ b/src/current/_includes/v23.1/orchestration/start-cockroachdb-helm-secure.md @@ -55,6 +55,8 @@ If you are running a secure Helm deployment on Kubernetes 1.22 and later, you mu By default, the Helm chart will generate and sign 1 client and 1 node certificate to secure the cluster. To authenticate using your own CA, see [Certificate management](/docs/{{ page.version.version }}/secure-cockroachdb-kubernetes.html?filters=helm#use-a-custom-ca). {{site.data.alerts.end}} + Refer to the [CockroachDB Helm chart's `values.yaml` template](https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml). + 1. Install the CockroachDB Helm chart, specifying your custom values file. Provide a "release" name to identify and track this particular deployment of the chart, and override the default values with those in `my-values.yaml`. diff --git a/src/current/_includes/v23.2/orchestration/start-cockroachdb-helm-secure.md b/src/current/_includes/v23.2/orchestration/start-cockroachdb-helm-secure.md index 4ee4a185976..a2f3ebc52b8 100644 --- a/src/current/_includes/v23.2/orchestration/start-cockroachdb-helm-secure.md +++ b/src/current/_includes/v23.2/orchestration/start-cockroachdb-helm-secure.md @@ -55,6 +55,8 @@ If you are running a secure Helm deployment on Kubernetes 1.22 and later, you mu By default, the Helm chart will generate and sign 1 client and 1 node certificate to secure the cluster. To authenticate using your own CA, see [Certificate management](/docs/{{ page.version.version }}/secure-cockroachdb-kubernetes.html?filters=helm#use-a-custom-ca). {{site.data.alerts.end}} + Refer to the [CockroachDB Helm chart's `values.yaml` template](https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml). + 1. Install the CockroachDB Helm chart, specifying your custom values file. Provide a "release" name to identify and track this particular deployment of the chart, and override the default values with those in `my-values.yaml`. diff --git a/src/current/_includes/v24.1/orchestration/start-cockroachdb-helm-secure.md b/src/current/_includes/v24.1/orchestration/start-cockroachdb-helm-secure.md index 4ee4a185976..a2f3ebc52b8 100644 --- a/src/current/_includes/v24.1/orchestration/start-cockroachdb-helm-secure.md +++ b/src/current/_includes/v24.1/orchestration/start-cockroachdb-helm-secure.md @@ -55,6 +55,8 @@ If you are running a secure Helm deployment on Kubernetes 1.22 and later, you mu By default, the Helm chart will generate and sign 1 client and 1 node certificate to secure the cluster. To authenticate using your own CA, see [Certificate management](/docs/{{ page.version.version }}/secure-cockroachdb-kubernetes.html?filters=helm#use-a-custom-ca). {{site.data.alerts.end}} + Refer to the [CockroachDB Helm chart's `values.yaml` template](https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml). + 1. Install the CockroachDB Helm chart, specifying your custom values file. Provide a "release" name to identify and track this particular deployment of the chart, and override the default values with those in `my-values.yaml`. diff --git a/src/current/_includes/v24.3/orchestration/start-cockroachdb-helm-secure.md b/src/current/_includes/v24.3/orchestration/start-cockroachdb-helm-secure.md index 4ee4a185976..a2f3ebc52b8 100644 --- a/src/current/_includes/v24.3/orchestration/start-cockroachdb-helm-secure.md +++ b/src/current/_includes/v24.3/orchestration/start-cockroachdb-helm-secure.md @@ -55,6 +55,8 @@ If you are running a secure Helm deployment on Kubernetes 1.22 and later, you mu By default, the Helm chart will generate and sign 1 client and 1 node certificate to secure the cluster. To authenticate using your own CA, see [Certificate management](/docs/{{ page.version.version }}/secure-cockroachdb-kubernetes.html?filters=helm#use-a-custom-ca). {{site.data.alerts.end}} + Refer to the [CockroachDB Helm chart's `values.yaml` template](https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml). + 1. Install the CockroachDB Helm chart, specifying your custom values file. Provide a "release" name to identify and track this particular deployment of the chart, and override the default values with those in `my-values.yaml`. diff --git a/src/current/_includes/v24.3/orchestration/start-cockroachdb-local-helm-insecure.md b/src/current/_includes/v24.3/orchestration/start-cockroachdb-local-helm-insecure.md index 456419ff32c..9a820070312 100644 --- a/src/current/_includes/v24.3/orchestration/start-cockroachdb-local-helm-insecure.md +++ b/src/current/_includes/v24.3/orchestration/start-cockroachdb-local-helm-insecure.md @@ -16,7 +16,68 @@ $ helm repo update ~~~ -1. Install the CockroachDB Helm chart. +1. The cluster configuration is set in the Helm chart's [values file](https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml). + + {{site.data.alerts.callout_info}} + By default, the Helm chart 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?filters=helm). + {{site.data.alerts.end}} + + Before deploying, modify some parameters in our Helm chart's [values file](https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml): + + 1. Create a local YAML file (e.g., `my-values.yaml`) to specify your custom values. These will be used to override the defaults in `values.yaml`. + + 1. To avoid running out of memory when CockroachDB is not the only pod on a Kubernetes node, you *must* set memory limits explicitly. This is because CockroachDB does not detect the amount of memory allocated to its pod when run in Kubernetes. We recommend setting `conf.cache` and `conf.max-sql-memory` each to 1/4 of the `memory` allocation specified in `statefulset.resources.requests` and `statefulset.resources.limits`. + + {{site.data.alerts.callout_success}} + For example, if you are allocating 8Gi of `memory` to each CockroachDB node, allocate 2Gi to `cache` and 2Gi to `max-sql-memory`. + {{site.data.alerts.end}} + + {% include_cached copy-clipboard.html %} + ~~~ yaml + conf: + cache: "2Gi" + max-sql-memory: "2Gi" + ~~~ + + The Helm chart defaults to a secure deployment by automatically setting `tls.enabled` to `true`. For an insecure deployment, set `tls.enabled` to `false`: + + {% include_cached copy-clipboard.html %} + ~~~ yaml + tls: + enabled: false + ~~~ + + Your values file should look similar to: + + {% include_cached copy-clipboard.html %} + ~~~ yaml + conf: + cache: "2Gi" + max-sql-memory: "2Gi" + tls: + enabled: false + ~~~ + + Refer to the [CockroachDB Helm chart's `values.yaml` template](https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml). + +1. Install the CockroachDB Helm chart, specifying your custom values file. + + Provide a "release" name to identify and track this particular deployment of the chart, and override the default values with those in `my-values.yaml`. + + {{site.data.alerts.callout_info}} + This tutorial uses `my-release` as the release name. If you use a different value, be sure to adjust the release name in subsequent commands. + {{site.data.alerts.end}} + + {{site.data.alerts.callout_danger}} + To allow the CockroachDB pods to successfully deploy, do not set the [`--wait` flag](https://helm.sh/docs/intro/using_helm/#helpful-options-for-installupgraderollback) when using Helm commands. + {{site.data.alerts.end}} + + {% include_cached copy-clipboard.html %} + ~~~ shell + $ helm install my-release --values {custom-values}.yaml cockroachdb/cockroachdb + ~~~ + +1. Install the CockroachDB Helm chart. Provide a "release" name to identify and track this particular deployment of the chart. @@ -57,7 +118,7 @@ NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-71019b3a-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-0 standard 11m pvc-7108e172-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-1 standard 11m - pvc-710dcb66-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-2 standard 11m + pvc-710dcb66-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-2 standard 11m ~~~ {{site.data.alerts.callout_success}}