We strongly recommend that you regularly upgrade your CockroachDB version in order to pick up bug fixes, performance improvements, and new features.The upgrade process on Kubernetes is a staged update in which the Docker image is applied to the pods one at a time, with each pod being stopped and restarted in turn. This is to ensure that the cluster remains available during the upgrade.
Public operator
Manual configs
Helm
All kubectl steps should be performed in the . By default, this is cockroach-operator-system.
If you , substitute kubectl with oc in the following commands.
Verify that you can upgrade.To upgrade to a new major version, you must first be on a production release of the previous version. The release does not need to be the latest production release of the previous version, but it must be a production and not a testing release (alpha/beta).Therefore, in order to upgrade to v24.1, you must be on a production release of v23.2.
If you are upgrading to v24.1 from a production release earlier than v23.2, or from a testing release (alpha/beta), first . Be sure to complete all the steps.
Then return to this page and perform a second upgrade to v24.1.
If you are upgrading from a production release of v23.2, or from any earlier v24.1 patch release, you do not have to go through intermediate releases; continue to step 2.
Verify the overall health of your cluster using the . On the Overview:
Under Node Status, make sure all nodes that should be live are listed as such. If any nodes are unexpectedly listed as suspect or dead, identify why the nodes are offline and either restart them or them before beginning your upgrade. If there are dead and non-decommissioned nodes in your cluster, it will not be possible to finalize the upgrade (either automatically or manually).
Under Replication Status, make sure there are 0 under-replicated and unavailable ranges. Otherwise, performing a rolling upgrade increases the risk that ranges will lose a majority of their replicas and cause cluster unavailability. Therefore, it’s important to before beginning your upgrade.
In the Node List:
Make sure all nodes are on the same version. If not all nodes are on the same version, upgrade them to the cluster’s highest current version first, and then start this process over.
Make sure capacity and memory usage are reasonable for each node. Nodes must be able to tolerate some increase in case the new version uses more resources for your workload. Also go to Metrics > Dashboard: Hardware and make sure CPU percent is reasonable across the cluster. If there’s not enough headroom on any of these metrics, consider to your cluster before beginning your upgrade.
Review the and . If any affect your deployment, make the necessary changes before starting the rolling upgrade to v24.1.
Change the desired Docker image in the custom resource:
image: name: cockroachdb/cockroach:v24.1.26
Apply the new settings to the cluster:
$ kubectl apply -f example.yaml
The Operator will perform the staged update.
The Operator automatically sets the cluster.preserve_downgrade_option to the version you are upgrading from. This disables auto-finalization of the upgrade so that you can monitor the stability and performance of the upgraded cluster before manually finalizing the upgrade. This will enable certain features and performance improvements introduced in v24.1.Note that after finalization, it will no longer be possible to perform a downgrade to v23.2. In the event of a catastrophic failure or corruption, the only option will be to start a new cluster using the previous binary and then restore from a created prior to performing the upgrade.Finalization only applies when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) can always be downgraded.
To check the status of the rolling upgrade, run kubectl get pods. The pods are restarted one at a time with the new image.
Verify that all pods have been upgraded by running:
$ kubectl get pods \-o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.containers[0].image}{"\n"}'
You can also check the CockroachDB version of each node in the .
Monitor the stability and performance of your cluster until you are comfortable with the upgrade (generally at least a day).If you decide to roll back the upgrade, revert the image name in the custom resource and apply the new value.
This is only possible when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) are auto-finalized.
To finalize the upgrade, re-enable auto-finalization:
Start the CockroachDB . For example, if you followed the steps in to launch a secure client pod, get a shell into the cockroachdb-client-secure pod:
After the upgrade to v24.1 is finalized, you may notice an increase in activity due to a background migration within the storage engine. To observe the migration’s progress, check the Compactions section of the in the DB Console or monitor the storage.marked-for-compaction-files . When the metric’s value nears or reaches 0, the migration is complete and compaction activity will return to normal levels. By default, the uses a compaction concurrency of 3. If you have sufficient IOPS and CPU headroom, you can consider increasing this setting via the COCKROACH_COMPACTION_CONCURRENCY environment variable. This may help to reshape the LSM more quickly in scenarios; and it can lead to increased overall performance for some workloads. Cockroach Labs strongly recommends testing your workload against non-default values of this setting.
Exit the SQL shell and pod:
> \q
Verify that you can upgrade.To upgrade to a new major version, you must first be on a production release of the previous version. The release does not need to be the latest production release of the previous version, but it must be a production and not a testing release (alpha/beta).Therefore, in order to upgrade to v24.1, you must be on a production release of v23.2.
If you are upgrading to v24.1 from a production release earlier than v23.2, or from a testing release (alpha/beta), first . Be sure to complete all the steps.
Then return to this page and perform a second upgrade to v24.1.
If you are upgrading from any production release of v23.2, or from any earlier v24.1 patch release, you do not have to go through intermediate releases; continue to step 2.
Verify the overall health of your cluster using the . On the Overview:
Under Node Status, make sure all nodes that should be live are listed as such. If any nodes are unexpectedly listed as suspect or dead, identify why the nodes are offline and either restart them or them before beginning your upgrade. If there are dead and non-decommissioned nodes in your cluster, it will not be possible to finalize the upgrade (either automatically or manually).
Under Replication Status, make sure there are 0 under-replicated and unavailable ranges. Otherwise, performing a rolling upgrade increases the risk that ranges will lose a majority of their replicas and cause cluster unavailability. Therefore, it’s important to before beginning your upgrade.
In the Node List:
Make sure all nodes are on the same version. If not all nodes are on the same version, upgrade them to the cluster’s highest current version first, and then start this process over.
Make sure capacity and memory usage are reasonable for each node. Nodes must be able to tolerate some increase in case the new version uses more resources for your workload. Also go to Metrics > Dashboard: Hardware and make sure CPU percent is reasonable across the cluster. If there’s not enough headroom on any of these metrics, consider to your cluster before beginning your upgrade.
Review the and . If any affect your deployment, make the necessary changes before starting the rolling upgrade to v24.1.
Decide how the upgrade will be finalized.By default, after all nodes are running the new version, the upgrade process will be auto-finalized. This will enable certain features and performance improvements introduced in v24.1. After finalization, however, it will no longer be possible to perform a downgrade to v23.2. In the event of a catastrophic failure or corruption, the only option is to start a new cluster using the old binary and then restore from a created prior to the upgrade.
For this reason, we recommend disabling auto-finalization so you can monitor the stability and performance of the upgraded cluster before finalizing the upgrade, but note that you will need to follow all of the subsequent directions, including the manual finalization in a later step.Finalization only applies when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) can always be downgraded.
Start the CockroachDB . For example, if you followed the steps in to launch a secure client pod, get a shell into the cockroachdb-client-secure pod:
Set the cluster.preserve_downgrade_option to the version you are upgrading from:
> SET CLUSTER SETTING cluster.preserve_downgrade_option = '["23.2"]';
Exit the SQL shell and delete the temporary pod:
> \q
Add a partition to the update strategy defined in the StatefulSet. Only the pods numbered greater than or equal to the partition value will be updated. For a cluster with 3 pods (e.g., cockroachdb-0, cockroachdb-1, cockroachdb-2) the partition value should be 2:
You can also check the CockroachDB version of each node in the .
If you disabled auto-finalization earlier, monitor the stability and performance of your cluster until you are comfortable with the upgrade (generally at least a day).If you decide to roll back the upgrade, repeat the rolling restart procedure with the old binary.This is only possible when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) are auto-finalized.To finalize the upgrade, re-enable auto-finalization:
After the upgrade to v24.1 is finalized, you may notice an increase in compaction activity due to a background migration within the storage engine. To observe the migration’s progress, check the Compactions section of the in the DB Console or monitor the storage.marked-for-compaction-files . When the metric’s value nears or reaches 0, the migration is complete and compaction activity will return to normal levels.
Exit the SQL shell and delete the temporary pod:
> \q
Verify that you can upgrade.To upgrade to a new major version, you must first be on a production release of the previous version. The release does not need to be the latest production release of the previous version, but it must be a production and not a testing release (alpha/beta).Therefore, in order to upgrade to v24.1, you must be on a production release of v23.2.
If you are upgrading to v24.1 from a production release earlier than v23.2, or from a testing release (alpha/beta), first . Be sure to complete all the steps.
Then return to this page and perform a second upgrade to v24.1.
If you are upgrading from any production release of v23.2, or from any earlier v24.1 patch release, you do not have to go through intermediate releases; continue to step 2.
Verify the overall health of your cluster using the . On the Overview:
Under Node Status, make sure all nodes that should be live are listed as such. If any nodes are unexpectedly listed as suspect or dead, identify why the nodes are offline and either restart them or them before beginning your upgrade. If there are dead and non-decommissioned nodes in your cluster, it will not be possible to finalize the upgrade (either automatically or manually).
Under Replication Status, make sure there are 0 under-replicated and unavailable ranges. Otherwise, performing a rolling upgrade increases the risk that ranges will lose a majority of their replicas and cause cluster unavailability. Therefore, it’s important to before beginning your upgrade.
In the Node List:
Make sure all nodes are on the same version. If not all nodes are on the same version, upgrade them to the cluster’s highest current version first, and then start this process over.
Make sure capacity and memory usage are reasonable for each node. Nodes must be able to tolerate some increase in case the new version uses more resources for your workload. Also go to Metrics > Dashboard: Hardware and make sure CPU percent is reasonable across the cluster. If there’s not enough headroom on any of these metrics, consider to your cluster before beginning your upgrade.
Review the and . If any affect your deployment, make the necessary changes before starting the rolling upgrade to v24.1.
Decide how the upgrade will be finalized.By default, after all nodes are running the new version, the upgrade process will be auto-finalized. This will enable certain features and performance improvements introduced in v24.1. After finalization, however, it will no longer be possible to perform a downgrade to v23.2. In the event of a catastrophic failure or corruption, the only option is to start a new cluster using the old binary and then restore from a created prior to the upgrade.
For this reason, we recommend disabling auto-finalization so you can monitor the stability and performance of the upgraded cluster before finalizing the upgrade, but note that you will need to follow all of the subsequent directions, including the manual finalization in a later step.Finalization only applies when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) can always be downgraded.
Get a shell into the pod with the cockroach binary created earlier and start the CockroachDB :
Set the cluster.preserve_downgrade_option to the version you are upgrading from:
> SET CLUSTER SETTING cluster.preserve_downgrade_option = '["23.2"]';
Exit the SQL shell and delete the temporary pod:
> \q
Add a partition to the update strategy defined in the StatefulSet. Only the pods numbered greater than or equal to the partition value will be updated. For a cluster with 3 pods (e.g., cockroachdb-0, cockroachdb-1, cockroachdb-2) the partition value should be 2:
You can also check the CockroachDB version of each node in the .
If you disabled auto-finalization earlier, monitor the stability and performance of your cluster until you are comfortable with the upgrade (generally at least a day).If you decide to roll back the upgrade, repeat the rolling restart procedure with the old binary.This is only possible when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) are auto-finalized.To finalize the upgrade, re-enable auto-finalization:
Get a shell into the pod with the cockroach binary created earlier and start the CockroachDB :
After the upgrade to v24.1 is finalized, you may notice an increase in compaction activity due to a background migration within the storage engine. To observe the migration’s progress, check the Compactions section of the in the DB Console or monitor the storage.marked-for-compaction-files . When the metric’s value nears or reaches 0, the migration is complete and compaction activity will return to normal levels.
Exit the SQL shell and delete the temporary pod:
> \q
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"CockroachDB","colors":{"primary":"#9059FF","light":"#9059FF","dark":"#9059FF"},"logo":{"light":"https://mintcdn.com/cockroachlabs/4WvUnbVuGZfqM4kW/images/CockroachLabs_Wordmark_Black.png?fit=max\u0026auto=format\u0026n=4WvUnbVuGZfqM4kW\u0026q=85\u0026s=54ccae625c9986bf1df8ddc7b2c571f0","dark":"https://mintcdn.com/cockroachlabs/4WvUnbVuGZfqM4kW/images/CockroachLabs_Wordmark_White.png?fit=max\u0026auto=format\u0026n=4WvUnbVuGZfqM4kW\u0026q=85\u0026s=0dd9b66973a1c7d3dd72aa67b6094efe","href":"https://www.cockroachlabs.com/"},"favicon":{"light":"https://mintcdn.com/cockroachlabs/2yihO7vMXnL0G_07/images/favicon.svg?fit=max\u0026auto=format\u0026n=2yihO7vMXnL0G_07\u0026q=85\u0026s=01f9aa59c9f275e1f35cd424a27d2551","dark":"https://mintcdn.com/cockroachlabs/2yihO7vMXnL0G_07/images/favicon.svg?fit=max\u0026auto=format\u0026n=2yihO7vMXnL0G_07\u0026q=85\u0026s=01f9aa59c9f275e1f35cd424a27d2551"},"api":{"examples":{"defaults":"required","languages":["curl"]}},"appearance":{"default":"light"},"navbar":{"primary":{"type":"button","label":"Get started free","href":"https://cockroachlabs.cloud/signup?referralId=cc_nav_global\u0026_ga=2.242886210.1147139380.1759903632-41552699.1759903632"}},"footer":{"socials":{"youtube":"https://www.youtube.com/@cockroachdb","x":"https://x.com/CockroachDB","linkedin":"https://www.linkedin.com/company/cockroach-labs/mycompany/verification","instagram":"https://www.instagram.com/cockroachdb"},"links":[{"header":"Product","items":[{"label":"CockroachDB","href":"https://www.cockroachlabs.com/product"},{"label":"CockroachDB Cloud","href":"https://www.cockroachlabs.com/product/cockroachcloud"},{"label":"Compare","href":"https://www.cockroachlabs.com/compare"},{"label":"Pricing","href":"https://www.cockroachlabs.com/pricing"},{"label":"Get CockroachDB","href":"https://www.cockroachlabs.com/get-started-cockroachdb"},{"label":"Sign In","href":"https://cockroachlabs.cloud/"}]},{"header":"Resources","items":[{"label":"Guides","href":"https://resources.cockroachlabs.com/guides"},{"label":"Webinars","href":"https://www.cockroachlabs.com/community/webinars"},{"label":"Videos","href":"https://www.cockroachlabs.com/resources/video"},{"label":"Architecture Overview","href":"https://www.cockroachlabs.com/docs/stable/architecture/overview"},{"label":"FAQ","href":"https://www.cockroachlabs.com/docs/stable/frequently-asked-questions"},{"label":"Security","href":"https://www.cockroachlabs.com/security"}]},{"header":"Learn \u0026 Support","items":[{"label":"Docs","href":"https://www.cockroachlabs.com/docs"},{"label":"University","href":"https://learn.cockroachlabs.com/"},{"label":"Developers","href":"https://www.cockroachlabs.com/developers"},{"label":"Forum","href":"https://forum.cockroachlabs.com/"},{"label":"Slack","href":"https://cockroa.ch/slack"},{"label":"Support Portal","href":"https://support.cockroachlabs.com/hc/en-us"},{"label":"Contact Us","href":"https://www.cockroachlabs.com/contact"}]},{"header":"Company","items":[{"label":"About","href":"https://www.cockroachlabs.com/about"},{"label":"Blog","href":"https://www.cockroachlabs.com/blog"},{"label":"Careers","href":"https://www.cockroachlabs.com/careers"},{"label":"Customers","href":"https://www.cockroachlabs.com/customers"},{"label":"News","href":"https://www.cockroachlabs.com/press"},{"label":"Privacy","href":"https://www.cockroachlabs.com/privacy"},{"label":"Terms of Use","href":"https://www.cockroachlabs.com/website-terms-of-use"}]}]},"fonts":{"heading":{"family":"Poppins"},"body":{"family":"Open Sans"}},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}},"latex":true},"integrations":{"gtm":{"tagId":"GTM-NR8LC4"}},"errors":{"404":{"redirect":false,"title":"Page not found","description":"The page you're looking for doesn't exist. [Return to docs home](/index.html)."}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"interaction":{"drilldown":false},"navigation":{"global":{"anchors":[{"anchor":"University","icon":"graduation-cap","href":"https://learn.cockroachlabs.com/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cockroachlabs","hasAudioNarration":false,"actualSubdomain":"cockroachlabs","customDomains":["docs.cockroachlabs.com"],"gitSource":{"type":"github","owner":"cockroachlabs","repo":"docs","deployBranch":"main","contentDirectory":"cockroachlabs-preview-main","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adc24f9d1a26b8362e3268c","collectionId":"7d02ecdd-010f-452c-a839-1542479b4ee8","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adc24f9d1a26b8362e3268c"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adc24f9d1a26b8362e3268c","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"CockroachDB","count":6968},{"language":"default","tag":"Docs","count":3238},{"language":"default","tag":"SQL","count":2562},{"language":"default","tag":"Statements","count":1710},{"language":"default","tag":"Self-Hosted Deployments","count":1479},{"language":"default","tag":"Reference","count":774},{"language":"default","tag":"Cloud Deployments","count":616},{"language":"default","tag":"Endpoints","count":528},{"language":"default","tag":"Cloud API Reference","count":518},{"language":"default","tag":"Get Started","count":441}],"searchSettings":{"isFiltersEnabled":false}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","content":":root{--inline-code-bg-light:rgb(var(--gray-200) / 0.92);--inline-code-bg-dark:rgb(255 255 255 / 0.08)}.prose :not(pre)>code{background-color:var(--inline-code-bg-light)!important}.dark .prose :not(pre)>code{background-color:var(--inline-code-bg-dark)!important}@media (min-width:1536px){#navbar>.max-w-8xl,[class*=\"peer-[.is-not-custom]:peer-[.is-not-center]:max-w-8xl\"]{width:100%!important;max-width:none!important}}#navigation-items{display:flex;flex-direction:column}#navigation-items>ul:not(.sidebar-group){order:1;margin-top:1.5rem}.crdb-fixed-table table,.crdb-metrics-table table{table-layout:fixed!important;width:100%!important;min-width:0!important;max-width:100%!important;border-collapse:collapse}.crdb-fixed-table table td,.crdb-fixed-table table th,.crdb-metrics-table table td,.crdb-metrics-table table th{min-width:0!important;overflow-wrap:anywhere;word-break:break-word}.bg-cover{background-size:cover;background-repeat:no-repeat;background-position:center center}.bg-cover__bg-3-1{background-image:url(https://cockroach-labs-docs.imgix.net/bg-3-1.png?auto=format,compress\u0026w=1200\u0026q=40)}.home-header{border-radius:.5rem;margin-bottom:2rem!important;padding:2rem}.card{border:1px solid #e5e7eb;border-radius:.75rem;background-color:#fff}.dark .card{background-color:#0d1117;border-color:rgba(255,255,255,.1)}.card-link,.card-link:hover{transform:none!important;box-shadow:none!important}.card-link{text-decoration:none!important;overflow:hidden}.card-link:hover{outline:1px solid rgba(105,51,255,.55);outline-offset:-1px}.card-link a,.card-link a:hover,.card-link h3,.card-link h3:hover,.card-link p,.card-link p:hover{border:0!important;text-decoration:none!important;transform:none!important}.card-link a{display:block;width:100%}.card-link h3{font-size:1rem!important;font-weight:600!important}.card-body{padding:1.5rem}.landing-column-title{margin-bottom:1rem}.article-lists h3,.overline{text-transform:uppercase;letter-spacing:.05em}.btn-redirect{display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border:2px solid #e5e7eb;border-radius:.5rem;text-decoration:none;transition:border-color .2s}.btn-redirect:hover{border-color:#6933ff}.btn-block{display:flex;width:100%;justify-content:center}.dark .btn-redirect{border-color:rgba(255,255,255,.1)}.article-section-title{font-size:1.25rem!important}.article-lists h3{font-size:.875rem!important;font-weight:600!important;color:#6b7280!important}.dark .article-lists h3,.dark .card-link .card-desc{color:#9ca3af!important}.article-lists ul{font-size:.875rem}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)}.bg-dark-wing{background-color:#152849;border-radius:.5rem}.text-ice-temple{color:#1bf8ec!important;display:inline-flex;align-items:center;gap:.375rem}.text-ice-temple img{display:inline-block;margin:0}.bg-dark-wing h2{font-size:clamp(1.25rem,1rem + 1.5vw,1.75rem)!important}@media (max-width:576px){.card-body.bg-dark-wing{padding:1.25rem!important}}.text-decoration-none{text-decoration:none!important}.text-muted{color:#6b7280!important}.card-link .card-desc{font-size:.9375rem!important;font-weight:400!important;line-height:1.5!important;text-align:left!important;color:#4b5563!important;width:100%;margin-top:.5rem}.report-tag{display:inline-block;padding:.25rem .75rem;border-radius:.25rem;background-color:rgba(84,42,189,.08);color:#542abd}.dark .report-tag{background-color:rgba(84,42,189,.3);color:#b39dff}.resilience-report-img{background-image:url(/images/state-resilience.png);background-size:cover;background-position:center;min-height:150px;border-radius:.5rem}.row{flex-wrap:wrap;margin-left:-.75rem;margin-right:-.75rem}.display-flex,.row{display:flex!important}.col-lg-4{flex:0 0 auto;width:100%;padding-left:.75rem;padding-right:.75rem}@media (min-width:992px){.col-lg-4{width:33.333333%!important}}.col-lg-3,.col-sm-6,.col-xs-12{flex:0 0 auto;width:100%!important;padding-left:.75rem;padding-right:.75rem}@media (min-width:992px){.col-lg-3{width:25%!important}}@media (min-width:576px){.col-sm-6{width:50%!important}}.col-12{width:100%!important}.col-lg-12{width:100%;padding-left:.75rem;padding-right:.75rem}@media (min-width:992px){.col-lg-12{width:100%!important}}.col-md-4,.col-md-8{flex:0 0 auto;width:100%;padding-left:.75rem;padding-right:.75rem}@media (min-width:768px){.col-md-4{width:33.333333%!important}.col-md-8{width:66.666667%!important}}.h-100{height:100%}.d-flex{display:flex}.flex-column{flex-direction:column}.mb-3{margin-bottom:1rem!important}.mb-5{margin-bottom:3rem!important}.pb-5{padding-bottom:3rem!important}.mb-xl-5{margin-bottom:3rem!important}.mt-auto{margin-top:auto!important}.mt-0{margin-top:0!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-5:not(.code-block){margin-top:3rem!important}.code-block.mb-8{margin-bottom:calc(var(--spacing)*5)}.pt-5{padding-top:3rem!important}.m-0{margin:0!important}.ml-2{margin-left:.5rem!important}.mb-0{margin-bottom:0!important}.mb-2{margin-bottom:.5rem!important}.mb-4{margin-bottom:1.5rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.ml-1{margin-left:.25rem!important}.mr-auto{margin-right:auto!important}.justify-content-center{justify-content:center!important}.align-items-center{align-items:center!important}@media (min-width:1200px){.p-xl-5{padding:3rem!important}}.mx-0{margin-left:0!important;margin-right:0!important}.text-center{text-align:center}.dark .text-black,.text-white{color:#fff!important}.text-black{color:#000!important}.container{width:100%;max-width:1200px;margin-left:auto;margin-right:auto;padding-left:1rem;padding-right:1rem}.card-header-overlap-text{position:relative}@media (min-width:768px){.p-md-5{padding:3rem!important}}@media (min-width:992px){.d-lg-flex{display:flex!important}.mb-lg-0{margin-bottom:0!important}}.prose table{border-collapse:collapse!important}.prose table td,.prose table th{border:1px solid rgb(var(--gray-200))!important}.dark .prose table td,.dark .prose table th{border-color:rgb(var(--gray-700)/.5)!important}.prose table th{padding:.571429em;font-weight:600;vertical-align:bottom;color:var(--tw-prose-headings);text-align:left}.prose table th.center-align{text-align:center}.prose table td{padding:.571429em;vertical-align:baseline}[data-component-part=accordion-description]{font-size:.875rem!important}.accordion.mb-3{margin-bottom:.25rem!important}@media (max-width:991.98px){[id^=kapa-widget-container] button{width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;font-size:0!important}[id^=kapa-widget-container] button svg{width:18px!important;height:18px!important}[id^=kapa-widget-container] button span{display:none!important}}table.crdb-fixed-table{table-layout:fixed!important;min-width:0!important;width:100%}table.crdb-fixed-table td,table.crdb-fixed-table th{min-width:0!important;overflow-wrap:break-word;word-break:normal}.sql-grammar svg .line{fill:none;stroke:#262626}.sql-grammar svg .bold-line{stroke:#0a0a0a;shape-rendering:crispEdges;stroke-width:2}.sql-grammar svg .thin-line{stroke:#0f0f0f;shape-rendering:crispEdges}.sql-grammar svg .filled{fill:#262626;stroke:none}.sql-grammar svg text.terminal{font-family:Verdana,Sans-serif;font-size:12px;fill:#0a0a0a;font-weight:700}.sql-grammar svg text.nonterminal,.sql-grammar svg text.regexp{font-family:Verdana,Sans-serif;font-size:12px;fill:#05f}.sql-grammar svg text.regexp{fill:#0f0f0f}.sql-grammar svg circle,.sql-grammar svg polygon,.sql-grammar svg rect{fill:#262626;stroke:#262626}.sql-grammar svg polygon.regexp,.sql-grammar svg rect.nonterminal,.sql-grammar svg rect.terminal{fill:#fff;stroke:#262626}.sql-grammar svg rect.text{fill:none;stroke:none}.sql-grammar svg{background-color:#fff}.sql-grammar a[name]::before{content:'';display:block;height:80px;margin:-80px 0 0}.sql-grammar a[name]:focus{outline:0}pre[language=sql][data-crdb-prompt-stripped] code::before{content:\"> \";color:#94e2d5;user-select:none}.mark-yes{color:#008a5e;font-weight:600}.dark .mark-yes{color:#3ddc97}"}],"page":{"pagePath":"docs/v24.1/upgrade-cockroachdb-kubernetes","slug":"/docs/v24.1/upgrade-cockroachdb-kubernetes","pageMetadata":{"title":"Cluster Upgrades","old_description":"How to upgrade a secure 3-node CockroachDB cluster with Kubernetes.","canonical":"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes","description":null,"href":"/docs/v24.1/upgrade-cockroachdb-kubernetes"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const InternalLink=({version,path=``,children,...props})=>{const _components={a:`a`,..._provideComponents()};let detectedVersion=version||`stable`;if(typeof window!==`undefined`\u0026\u0026!version){const match=window.location.pathname.match(/\\/docs\\/([^/]+)/);if(match){detectedVersion=match[1]}}const normalizedPath=path.startsWith(`/`)?path.slice(1):path;return _jsx(_components.a,{href:`/docs/${detectedVersion}/${normalizedPath}`,...props,children})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Note,Tab,Tabs,Tip,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`This article assumes you have already `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`deploy-cockroachdb-with-kubernetes`,children:`deployed CockroachDB on a single Kubernetes cluster`})}),`.`]})}),`\n`,_jsx(_components.p,{children:`We strongly recommend that you regularly upgrade your CockroachDB version in order to pick up bug fixes, performance improvements, and new features.`}),`\n`,_jsxs(_components.p,{children:[`The upgrade process on Kubernetes is a `,_jsx(_components.a,{href:`https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set#staging-an-update`,children:`staged update`}),` in which the Docker image is applied to the pods one at a time, with each pod being stopped and restarted in turn. This is to ensure that the cluster remains available during the upgrade.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Public operator`,id:`public-operator`,children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`All `,_jsx(_components.code,{children:`kubectl`}),` steps should be performed in the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`deploy-cockroachdb-with-kubernetes#install-the-operator`,children:`namespace where you installed the Operator`})}),`. By default, this is `,_jsx(_components.code,{children:`cockroach-operator-system`}),`.`]})}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`If you `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`deploy-cockroachdb-with-kubernetes-openshift`,children:`deployed CockroachDB on Red Hat OpenShift`})}),`, substitute `,_jsx(_components.code,{children:`kubectl`}),` with `,_jsx(_components.code,{children:`oc`}),` in the following commands.`]})}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Verify that you can upgrade.`}),`\n`,_jsxs(_components.p,{children:[`To upgrade to a new major version, you must first be on a production release of the previous version. The release does not need to be the latest production release of the previous version, but it must be a production `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{version:`releases`,path:`index`,children:`release`})}),` and not a testing release (alpha/beta).`]}),`\n`,_jsx(_components.p,{children:`Therefore, in order to upgrade to v24.1, you must be on a production release of v23.2.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`If you are upgrading to v24.1 from a production release earlier than v23.2, or from a testing release (alpha/beta), first `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`upgrade-cockroachdb-kubernetes`,children:`upgrade to a production release of v23.2`})}),`. Be sure to complete all the steps.`]}),`\n`,_jsx(_components.li,{children:`Then return to this page and perform a second upgrade to v24.1.`}),`\n`,_jsx(_components.li,{children:`If you are upgrading from a production release of v23.2, or from any earlier v24.1 patch release, you do not have to go through intermediate releases; continue to step 2.`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Verify the overall health of your cluster using the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`ui-overview`,children:`DB Console`})}),`. On the `,_jsx(_components.strong,{children:`Overview`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Under `,_jsx(_components.strong,{children:`Node Status`}),`, make sure all nodes that should be live are listed as such. If any nodes are unexpectedly listed as suspect or dead, identify why the nodes are offline and either restart them or `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`scale-cockroachdb-kubernetes#remove-nodes`,children:`decommission`})}),` them before beginning your upgrade. If there are dead and non-decommissioned nodes in your cluster, it will not be possible to finalize the upgrade (either automatically or manually).`]}),`\n`,_jsxs(_components.li,{children:[`Under `,_jsx(_components.strong,{children:`Replication Status`}),`, make sure there are 0 under-replicated and unavailable ranges. Otherwise, performing a rolling upgrade increases the risk that ranges will lose a majority of their replicas and cause cluster unavailability. Therefore, it’s important to `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cluster-setup-troubleshooting#replication-issues`,children:`identify and resolve the cause of range under-replication and/or unavailability`})}),` before beginning your upgrade.`]}),`\n`,_jsxs(_components.li,{children:[`In the `,_jsx(_components.strong,{children:`Node List`}),`:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Make sure all nodes are on the same version. If not all nodes are on the same version, upgrade them to the cluster’s highest current version first, and then start this process over.`}),`\n`,_jsxs(_components.li,{children:[`Make sure capacity and memory usage are reasonable for each node. Nodes must be able to tolerate some increase in case the new version uses more resources for your workload. Also go to `,_jsx(_components.strong,{children:`Metrics > Dashboard: Hardware`}),` and make sure CPU percent is reasonable across the cluster. If there’s not enough headroom on any of these metrics, consider `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`scale-cockroachdb-kubernetes#add-nodes`,children:`adding nodes`})}),` to your cluster before beginning your upgrade.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Review the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{version:`releases`,path:`v24.1`,children:`backward-incompatible changes in v24.1`})}),` and `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{version:`releases`,path:`v24.1`,children:`deprecated features`})}),`. If any affect your deployment, make the necessary changes before starting the rolling upgrade to v24.1.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Change the desired Docker image in the custom resource:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`image:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` name: cockroachdb/cockroach:v24.1.26`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Apply the new settings to the cluster:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` apply`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -f`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` example.yaml`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The Operator will perform the staged update.`}),`\n`]}),`\n`]}),_jsxs(Note,{children:[_jsxs(_components.p,{children:[`The Operator automatically sets the `,_jsx(_components.code,{children:`cluster.preserve_downgrade_option`}),` `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cluster-settings`,children:`cluster setting`})}),` to the version you are upgrading from. This disables auto-finalization of the upgrade so that you can monitor the stability and performance of the upgraded cluster before manually finalizing the upgrade. This will enable certain features and performance improvements introduced in v24.1.`]}),_jsxs(_components.p,{children:[`Note that after finalization, it will no longer be possible to perform a downgrade to v23.2. In the event of a catastrophic failure or corruption, the only option will be to start a new cluster using the previous binary and then restore from a `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`take-full-and-incremental-backups`,children:`backup`})}),` created prior to performing the upgrade.`]}),_jsx(_components.p,{children:`Finalization only applies when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) can always be downgraded.`})]}),_jsxs(_components.ol,{start:`6`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`To check the status of the rolling upgrade, run `,_jsx(_components.code,{children:`kubectl get pods`}),`. The pods are restarted one at a time with the new image.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Verify that all pods have been upgraded by running:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` get`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` pods`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-o `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`jsonpath='{range .items[*]}{.metadata.name}{\"\\\\t\"}{.spec.containers[0].image}{\"\\\\n\"}'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can also check the CockroachDB version of each node in the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`ui-cluster-overview-page#node-details`,children:`DB Console`})}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Monitor the stability and performance of your cluster until you are comfortable with the upgrade (generally at least a day).`}),`\n`,_jsx(_components.p,{children:`If you decide to roll back the upgrade, revert the image name in the custom resource and apply the new value.`}),`\n`]}),`\n`]}),_jsx(Note,{children:_jsx(_components.p,{children:`This is only possible when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) are auto-finalized.`})}),_jsx(_components.p,{children:`To finalize the upgrade, re-enable auto-finalization:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Start the CockroachDB `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-sql`,children:`built-in SQL client`})}),`. For example, if you followed the steps in `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`deploy-cockroachdb-with-kubernetes#step-3-use-the-built-in-sql-client`,children:`Deploy CockroachDB with Kubernetes`})}),` to launch a secure client pod, get a shell into the `,_jsx(_components.code,{children:`cockroachdb-client-secure`}),` pod:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` exec`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -it`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb-client-secure`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\-`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`-`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` ./cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` sql`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--certs-dir=/cockroach/cockroach-certs `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--host={`}),_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`cluster-name}-public`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Re-enable auto-finalization:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` RESET`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` CLUSTER SETTING cluster.preserve_downgrade_option;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`After the upgrade to v24.1 is finalized, you may notice an increase in `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/storage-layer#compaction`,children:`compaction`})}),` activity due to a background migration within the storage engine. To observe the migration’s progress, check the `,_jsx(_components.strong,{children:`Compactions`}),` section of the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`ui-storage-dashboard`,children:`Storage Dashboard`})}),` in the DB Console or monitor the `,_jsx(_components.code,{children:`storage.marked-for-compaction-files`}),` `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`metrics`,children:`time-series metric`})}),`. When the metric’s value nears or reaches `,_jsx(_components.code,{children:`0`}),`, the migration is complete and compaction activity will return to normal levels. By default, the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/storage-layer`,children:`storage engine`})}),` uses a compaction concurrency of 3. If you have sufficient IOPS and CPU headroom, you can consider increasing this setting via the `,_jsx(_components.code,{children:`COCKROACH_COMPACTION_CONCURRENCY`}),` environment variable. This may help to reshape the LSM more quickly in `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`architecture/storage-layer#inverted-lsms`,children:`inverted LSM`})}),` scenarios; and it can lead to increased overall performance for some workloads. Cockroach Labs `,_jsx(_components.strong,{children:`strongly recommends`}),` testing your workload against non-default values of this setting.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Exit the SQL shell and pod:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` \\\\q`})]}),`\n`]})})}),`\n`]}),`\n`]})]}),_jsx(Tab,{title:`Manual configs`,id:`manual-configs`,children:_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Verify that you can upgrade.`}),`\n`,_jsxs(_components.p,{children:[`To upgrade to a new major version, you must first be on a production release of the previous version. The release does not need to be the latest production release of the previous version, but it must be a production `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{version:`releases`,path:`index`,children:`release`})}),` and not a testing release (alpha/beta).`]}),`\n`,_jsx(_components.p,{children:`Therefore, in order to upgrade to v24.1, you must be on a production release of v23.2.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`If you are upgrading to v24.1 from a production release earlier than v23.2, or from a testing release (alpha/beta), first `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`upgrade-cockroachdb-kubernetes?filters=manual`,children:`upgrade to a production release of v23.2`})}),`. Be sure to complete all the steps.`]}),`\n`,_jsx(_components.li,{children:`Then return to this page and perform a second upgrade to v24.1.`}),`\n`,_jsx(_components.li,{children:`If you are upgrading from any production release of v23.2, or from any earlier v24.1 patch release, you do not have to go through intermediate releases; continue to step 2.`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Verify the overall health of your cluster using the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`ui-overview`,children:`DB Console`})}),`. On the `,_jsx(_components.strong,{children:`Overview`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Under `,_jsx(_components.strong,{children:`Node Status`}),`, make sure all nodes that should be live are listed as such. If any nodes are unexpectedly listed as suspect or dead, identify why the nodes are offline and either restart them or `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`scale-cockroachdb-kubernetes?filters=manual#remove-nodes`,children:`decommission`})}),` them before beginning your upgrade. If there are dead and non-decommissioned nodes in your cluster, it will not be possible to finalize the upgrade (either automatically or manually).`]}),`\n`,_jsxs(_components.li,{children:[`Under `,_jsx(_components.strong,{children:`Replication Status`}),`, make sure there are 0 under-replicated and unavailable ranges. Otherwise, performing a rolling upgrade increases the risk that ranges will lose a majority of their replicas and cause cluster unavailability. Therefore, it’s important to `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cluster-setup-troubleshooting#replication-issues`,children:`identify and resolve the cause of range under-replication and/or unavailability`})}),` before beginning your upgrade.`]}),`\n`,_jsxs(_components.li,{children:[`In the `,_jsx(_components.strong,{children:`Node List`}),`:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Make sure all nodes are on the same version. If not all nodes are on the same version, upgrade them to the cluster’s highest current version first, and then start this process over.`}),`\n`,_jsxs(_components.li,{children:[`Make sure capacity and memory usage are reasonable for each node. Nodes must be able to tolerate some increase in case the new version uses more resources for your workload. Also go to `,_jsx(_components.strong,{children:`Metrics > Dashboard: Hardware`}),` and make sure CPU percent is reasonable across the cluster. If there’s not enough headroom on any of these metrics, consider `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`scale-cockroachdb-kubernetes?filters=manual#add-nodes`,children:`adding nodes`})}),` to your cluster before beginning your upgrade.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Review the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{version:`releases`,path:`v24.1`,children:`backward-incompatible changes in v24.1`})}),` and `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{version:`releases`,path:`v24.1`,children:`deprecated features`})}),`. If any affect your deployment, make the necessary changes before starting the rolling upgrade to v24.1.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Decide how the upgrade will be finalized.`}),`\n`,_jsxs(_components.p,{children:[`By default, after all nodes are running the new version, the upgrade process will be `,_jsx(_components.strong,{children:`auto-finalized`}),`. This will enable certain features and performance improvements introduced in v24.1. After finalization, however, it will no longer be possible to perform a downgrade to v23.2. In the event of a catastrophic failure or corruption, the only option is to start a new cluster using the old binary and then restore from a `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`take-full-and-incremental-backups`,children:`backup`})}),` created prior to the upgrade.\nFor this reason, `,_jsx(_components.strong,{children:`we recommend disabling auto-finalization`}),` so you can monitor the stability and performance of the upgraded cluster before finalizing the upgrade, but note that you will need to follow all of the subsequent directions, including the manual finalization in a later step.`]}),`\n`,_jsx(_components.p,{children:`Finalization only applies when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) can always be downgraded.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Start the CockroachDB `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-sql`,children:`built-in SQL client`})}),`. For example, if you followed the steps in `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`deploy-cockroachdb-with-kubernetes?filters=manual#step-3-use-the-built-in-sql-client`,children:`Deploy CockroachDB with Kubernetes`})}),` to launch a secure client pod, get a shell into the `,_jsx(_components.code,{children:`cockroachdb-client-secure`}),` pod:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` exec`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -it`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb-client-secure`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\-`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`-`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` ./cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` sql`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--certs-dir=/cockroach-certs `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--host=cockroachdb-public`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Set the `,_jsx(_components.code,{children:`cluster.preserve_downgrade_option`}),` `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cluster-settings`,children:`cluster setting`})}),` to the version you are upgrading from:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` SET`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` CLUSTER SETTING cluster.preserve_downgrade_option `}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`=`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` '[\"23.2\"]'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Exit the SQL shell and delete the temporary pod:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` \\\\q`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Add a `,_jsx(_components.a,{href:`https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set#staging-an-update`,children:`partition`}),` to the update strategy defined in the StatefulSet. Only the pods numbered greater than or equal to the partition value will be updated. For a cluster with 3 pods (e.g., `,_jsx(_components.code,{children:`cockroachdb-0`}),`, `,_jsx(_components.code,{children:`cockroachdb-1`}),`, `,_jsx(_components.code,{children:`cockroachdb-2`}),`) the partition value should be 2:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` patch`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` statefulset`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-p=`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'{\"spec\":{\"updateStrategy\":{\"type\":\"RollingUpdate\",\"rollingUpdate\":{\"partition\":2}}}}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`statefulset.apps/cockroachdb patched`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Kick off the upgrade process by changing the Docker image used in the CockroachDB StatefulSet:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` patch`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` statefulset`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--type=`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'json'`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-p=`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'[{\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/image\", \"value\":\"cockroachdb/cockroach:v24.1.26\"}]'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`statefulset.apps/cockroachdb patched`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Check the status of your cluster’s pods. You should see one of them being restarted:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` get`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` pods`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`NAME READY STATUS RESTARTS AGE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-0 1/1 Running 0 2m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-1 1/1 Running 0 2m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-2 0/1 Terminating 0 1m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`After the pod has been restarted with the new image, start the CockroachDB `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-sql`,children:`built-in SQL client`})}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` exec`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -it`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb-client-secure`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\-`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`-`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` ./cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` sql`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--certs-dir=/cockroach-certs `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--host=cockroachdb-public`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Run the following SQL query to verify that the number of underreplicated ranges is zero:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:` sum`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`((metrics`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`->>`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'ranges.underreplicated'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`)::`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`DECIMAL`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`)::`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`INT`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` AS`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` ranges_underreplicated `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`FROM`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` crdb_internal.kv_store_status;`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ranges_underreplicated`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`--------------------------`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` 0`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`(1 row)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`This indicates that it is safe to proceed to the next pod.`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Exit the SQL shell:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` \\\\q`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Decrement the partition value by 1 to allow the next pod in the cluster to update:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` patch`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` statefulset`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-p=`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'{\"spec\":{\"updateStrategy\":{\"type\":\"RollingUpdate\",\"rollingUpdate\":{\"partition\":1}}}}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`statefulset.apps/cockroachdb patched`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Repeat steps 4-8 until all pods have been restarted and are running the new image (the final partition value should be `,_jsx(_components.code,{children:`0`}),`).`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Check the image of each pod to confirm that all have been upgraded:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` get`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` pods`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-o `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`jsonpath='{range .items[*]}{.metadata.name}{\"\\\\t\"}{.spec.containers[0].image}{\"\\\\n\"}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-0 cockroachdb/cockroach:v24.1.26`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-1 cockroachdb/cockroach:v24.1.26`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-2 cockroachdb/cockroach:v24.1.26`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`You can also check the CockroachDB version of each node in the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`ui-cluster-overview-page#node-details`,children:`DB Console`})}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`If you disabled auto-finalization earlier, monitor the stability and performance of your cluster until you are comfortable with the upgrade (generally at least a day).`}),`\n`,_jsx(_components.p,{children:`If you decide to roll back the upgrade, repeat the rolling restart procedure with the old binary.`}),`\n`,_jsx(_components.p,{children:`This is only possible when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) are auto-finalized.`}),`\n`,_jsx(_components.p,{children:`To finalize the upgrade, re-enable auto-finalization:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Start the CockroachDB `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-sql`,children:`built-in SQL client`})}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` exec`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -it`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb-client-secure`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-- `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`./cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` sql`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--certs-dir=/cockroach-certs `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--host=cockroachdb-public`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Re-enable auto-finalization:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` RESET`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` CLUSTER SETTING cluster.preserve_downgrade_option;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`After the upgrade to v24.1 is finalized, you may notice an increase in compaction activity due to a background migration within the storage engine. To observe the migration’s progress, check the `,_jsx(_components.strong,{children:`Compactions`}),` section of the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`ui-storage-dashboard`,children:`Storage Dashboard`})}),` in the DB Console or monitor the `,_jsx(_components.code,{children:`storage.marked-for-compaction-files`}),` `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`metrics`,children:`time-series metric`})}),`. When the metric’s value nears or reaches `,_jsx(_components.code,{children:`0`}),`, the migration is complete and compaction activity will return to normal levels.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Exit the SQL shell and delete the temporary pod:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` \\\\q`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`]})}),_jsxs(Tab,{title:`Helm`,id:`helm`,children:[_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Verify that you can upgrade.`}),`\n`,_jsxs(_components.p,{children:[`To upgrade to a new major version, you must first be on a production release of the previous version. The release does not need to be the latest production release of the previous version, but it must be a production `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{version:`releases`,path:`index`,children:`release`})}),` and not a testing release (alpha/beta).`]}),`\n`,_jsx(_components.p,{children:`Therefore, in order to upgrade to v24.1, you must be on a production release of v23.2.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`If you are upgrading to v24.1 from a production release earlier than v23.2, or from a testing release (alpha/beta), first `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`upgrade-cockroachdb-kubernetes?filters=helm`,children:`upgrade to a production release of v23.2`})}),`. Be sure to complete all the steps.`]}),`\n`,_jsx(_components.li,{children:`Then return to this page and perform a second upgrade to v24.1.`}),`\n`,_jsx(_components.li,{children:`If you are upgrading from any production release of v23.2, or from any earlier v24.1 patch release, you do not have to go through intermediate releases; continue to step 2.`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Verify the overall health of your cluster using the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`ui-overview`,children:`DB Console`})}),`. On the `,_jsx(_components.strong,{children:`Overview`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Under `,_jsx(_components.strong,{children:`Node Status`}),`, make sure all nodes that should be live are listed as such. If any nodes are unexpectedly listed as suspect or dead, identify why the nodes are offline and either restart them or `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`scale-cockroachdb-kubernetes?filters=helm#remove-nodes`,children:`decommission`})}),` them before beginning your upgrade. If there are dead and non-decommissioned nodes in your cluster, it will not be possible to finalize the upgrade (either automatically or manually).`]}),`\n`,_jsxs(_components.li,{children:[`Under `,_jsx(_components.strong,{children:`Replication Status`}),`, make sure there are 0 under-replicated and unavailable ranges. Otherwise, performing a rolling upgrade increases the risk that ranges will lose a majority of their replicas and cause cluster unavailability. Therefore, it’s important to `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cluster-setup-troubleshooting#replication-issues`,children:`identify and resolve the cause of range under-replication and/or unavailability`})}),` before beginning your upgrade.`]}),`\n`,_jsxs(_components.li,{children:[`In the `,_jsx(_components.strong,{children:`Node List`}),`:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Make sure all nodes are on the same version. If not all nodes are on the same version, upgrade them to the cluster’s highest current version first, and then start this process over.`}),`\n`,_jsxs(_components.li,{children:[`Make sure capacity and memory usage are reasonable for each node. Nodes must be able to tolerate some increase in case the new version uses more resources for your workload. Also go to `,_jsx(_components.strong,{children:`Metrics > Dashboard: Hardware`}),` and make sure CPU percent is reasonable across the cluster. If there’s not enough headroom on any of these metrics, consider `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`scale-cockroachdb-kubernetes?filters=helm#add-nodes`,children:`adding nodes`})}),` to your cluster before beginning your upgrade.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Review the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{version:`releases`,path:`v24.1`,children:`backward-incompatible changes in v24.1`})}),` and `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{version:`releases`,path:`v24.1`,children:`deprecated features`})}),`. If any affect your deployment, make the necessary changes before starting the rolling upgrade to v24.1.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Decide how the upgrade will be finalized.`}),`\n`,_jsxs(_components.p,{children:[`By default, after all nodes are running the new version, the upgrade process will be `,_jsx(_components.strong,{children:`auto-finalized`}),`. This will enable certain features and performance improvements introduced in v24.1. After finalization, however, it will no longer be possible to perform a downgrade to v23.2. In the event of a catastrophic failure or corruption, the only option is to start a new cluster using the old binary and then restore from a `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`take-full-and-incremental-backups`,children:`backup`})}),` created prior to the upgrade.\nFor this reason, `,_jsx(_components.strong,{children:`we recommend disabling auto-finalization`}),` so you can monitor the stability and performance of the upgraded cluster before finalizing the upgrade, but note that you will need to follow all of the subsequent directions, including the manual finalization in a later step.`]}),`\n`,_jsx(_components.p,{children:`Finalization only applies when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) can always be downgraded.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Get a shell into the pod with the `,_jsx(_components.code,{children:`cockroach`}),` binary created earlier and start the CockroachDB `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-sql`,children:`built-in SQL client`})}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` exec`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -it`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb-client-secure`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-- `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`./cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` sql`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--certs-dir=/cockroach-certs `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--host=my-release-cockroachdb-public`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Set the `,_jsx(_components.code,{children:`cluster.preserve_downgrade_option`}),` `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cluster-settings`,children:`cluster setting`})}),` to the version you are upgrading from:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` SET`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` CLUSTER SETTING cluster.preserve_downgrade_option `}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`=`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` '[\"23.2\"]'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Exit the SQL shell and delete the temporary pod:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` \\\\q`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Add a `,_jsx(_components.a,{href:`https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set#staging-an-update`,children:`partition`}),` to the update strategy defined in the StatefulSet. Only the pods numbered greater than or equal to the partition value will be updated. For a cluster with 3 pods (e.g., `,_jsx(_components.code,{children:`cockroachdb-0`}),`, `,_jsx(_components.code,{children:`cockroachdb-1`}),`, `,_jsx(_components.code,{children:`cockroachdb-2`}),`) the partition value should be 2:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` helm`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` upgrade`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`my-release `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`cockroachdb/cockroachdb `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--set `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`statefulset.updateStrategy.rollingUpdate.partition=`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`2`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Kick off the upgrade process by changing the Docker image used in the CockroachDB StatefulSet:`}),`\n`]}),`\n`]}),_jsx(Note,{children:_jsx(_components.p,{children:`For Helm, you must remove the cluster initialization job from when the cluster was created before the cluster version can be changed.`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` delete`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` job`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` my-release-cockroachdb-init`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` helm`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` upgrade`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`my-release `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`cockroachdb/cockroachdb `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--set `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`image.tag=v24.1.26`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--reuse-values`})}),`\n`]})})}),_jsxs(_components.ol,{start:`7`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Check the status of your cluster’s pods. You should see one of them being restarted:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` get`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` pods`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`NAME READY STATUS RESTARTS AGE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-0 1/1 Running 0 2m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-1 1/1 Running 0 3m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-2 0/1 ContainerCreating 0 25s`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-init-nwjkh 0/1 ContainerCreating 0 6s`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`]}),_jsx(Note,{children:_jsx(_components.p,{children:`Ignore the pod for cluster initialization. It is re-created as a byproduct of the StatefulSet configuration but does not impact your existing cluster.`})}),_jsxs(_components.ol,{start:`8`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`After the pod has been restarted with the new image, start the CockroachDB `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-sql`,children:`built-in SQL client`})}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` exec`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -it`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb-client-secure`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-- `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`./cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` sql`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--certs-dir=/cockroach-certs `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--host=my-release-cockroachdb-public`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Run the following SQL query to verify that the number of underreplicated ranges is zero:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:` sum`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`((metrics`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`->>`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`'ranges.underreplicated'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`)::`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`DECIMAL`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`)::`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`INT`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` AS`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` ranges_underreplicated `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`FROM`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` crdb_internal.kv_store_status;`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ranges_underreplicated`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`--------------------------`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` 0`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`(1 row)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`This indicates that it is safe to proceed to the next pod.`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Exit the SQL shell:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` \\\\q`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Decrement the partition value by 1 to allow the next pod in the cluster to update:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` helm`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` upgrade`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`my-release `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`cockroachdb/cockroachdb `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--set `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`statefulset.updateStrategy.rollingUpdate.partition=`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`1`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Repeat steps 4-8 until all pods have been restarted and are running the new image (the final partition value should be `,_jsx(_components.code,{children:`0`}),`).`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Check the image of each pod to confirm that all have been upgraded:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` get`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` pods`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-o `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`jsonpath='{range .items[*]}{.metadata.name}{\"\\\\t\"}{.spec.containers[0].image}{\"\\\\n\"}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-0 cockroachdb/cockroach:v24.1.26`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-1 cockroachdb/cockroach:v24.1.26`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-2 cockroachdb/cockroach:v24.1.26`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`You can also check the CockroachDB version of each node in the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`ui-cluster-overview-page#node-details`,children:`DB Console`})}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`If you disabled auto-finalization earlier, monitor the stability and performance of your cluster until you are comfortable with the upgrade (generally at least a day).`}),`\n`,_jsx(_components.p,{children:`If you decide to roll back the upgrade, repeat the rolling restart procedure with the old binary.`}),`\n`,_jsx(_components.p,{children:`This is only possible when performing a major version upgrade (for example, from v23.2.x to v24.1). Patch version upgrades (for example, within the v24.1.x series) are auto-finalized.`}),`\n`,_jsx(_components.p,{children:`To finalize the upgrade, re-enable auto-finalization:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Get a shell into the pod with the `,_jsx(_components.code,{children:`cockroach`}),` binary created earlier and start the CockroachDB `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`cockroach-sql`,children:`built-in SQL client`})}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#89B4FA`,\"--shiki-dark-font-style\":`italic`},children:`$`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` exec`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -it`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb-client-secure`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`-- `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`./cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` sql`}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--certs-dir=/cockroach-certs `}),_jsx(_components.span,{style:{color:`#F5C2E7`,\"--shiki-dark\":`#F5C2E7`},children:`\\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`--host=my-release-cockroachdb-public`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Re-enable auto-finalization:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` RESET`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` CLUSTER SETTING cluster.preserve_downgrade_option;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`After the upgrade to v24.1 is finalized, you may notice an increase in compaction activity due to a background migration within the storage engine. To observe the migration’s progress, check the `,_jsx(_components.strong,{children:`Compactions`}),` section of the `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`ui-storage-dashboard`,children:`Storage Dashboard`})}),` in the DB Console or monitor the `,_jsx(_components.code,{children:`storage.marked-for-compaction-files`}),` `,_jsx(_MdxComponentBoundary,{name:`InternalLink`,children:_jsx(InternalLink,{path:`metrics`,children:`time-series metric`})}),`. When the metric’s value nears or reaches `,_jsx(_components.code,{children:`0`}),`, the migration is complete and compaction activity will return to normal levels.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Exit the SQL shell and delete the temporary pod:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-mocha catppuccin-mocha`,style:{backgroundColor:`#1e1e2e`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#cdd6f4`,\"--shiki-dark\":`#cdd6f4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` \\\\q`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{InternalLink,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}},"config":{},"pageMetadata":{"title":"Cluster Upgrades","old_description":"How to upgrade a secure 3-node CockroachDB cluster with Kubernetes.","canonical":"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes","description":null,"href":"/docs/v24.1/upgrade-cockroachdb-kubernetes"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[148,586,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cockroachlabs/4695317e415d4eba/kapa.js","/_mintlify/custom/cockroachlabs/40fb45a3cfe42c92/copy-code-prompt.js"],"subdomain":"cockroachlabs","siteName":"CockroachDB","title":"Cluster Upgrades - CockroachDB","navMaps":{"firstHrefInVersion":{"v26.4":{"href":"/docs/v26.4/upgrade-cockroachdb-kubernetes","matchLevel":1},"v26.3":{"href":"/docs/stable/upgrade-cockroachdb-kubernetes","matchLevel":1},"v26.2":{"href":"/docs/v26.2/upgrade-cockroachdb-kubernetes","matchLevel":1,"canonicalOverride":true},"v26.1":{"href":"/docs/v26.1/upgrade-cockroachdb-kubernetes","matchLevel":1,"canonicalOverride":true},"v25.4":{"href":"/docs/v25.4/upgrade-cockroachdb-kubernetes","matchLevel":1,"canonicalOverride":true},"v25.3":{"href":"/docs/v25.3/upgrade-cockroachdb-kubernetes","matchLevel":1,"canonicalOverride":true},"v25.2":{"href":"/docs/v25.2/upgrade-cockroachdb-kubernetes","matchLevel":1,"canonicalOverride":true},"v25.1":{"href":"/docs/v25.1/upgrade-cockroachdb-kubernetes","matchLevel":1,"canonicalOverride":true},"v24.3":{"href":"/docs/v24.3/upgrade-cockroachdb-kubernetes","matchLevel":1,"canonicalOverride":true},"v24.1":{"href":"/docs/v24.1/upgrade-cockroachdb-kubernetes","matchLevel":0},"v23.2":{"href":"/docs/v23.2/upgrade-cockroachdb-kubernetes","matchLevel":1,"canonicalOverride":true},"v23.1":{"href":"/docs/v23.1/upgrade-cockroachdb-kubernetes","matchLevel":1,"canonicalOverride":true}},"firstHrefInLanguage":{}},"lastModified":"2026-10-24T02:19:55.934Z","originalFileLocation":"docs/v24.1/upgrade-cockroachdb-kubernetes.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"CockroachDB\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cluster Upgrades - CockroachDB\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"CockroachDB\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cockroachlabs.mintlify.app/_mintlify/api/og/v2?division=Operate+on+Kubernetes\u0026amp;title=Cluster+Upgrades\u0026amp;theme=7628870a42004e67b5b3df3d\u0026amp;signature=809198893a106a482a688d20aa896d838547c6fad79846c7dac9c70b203cc9df\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Cluster Upgrades - CockroachDB\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cockroachlabs.mintlify.app/_mintlify/api/og/v2?division=Operate+on+Kubernetes\u0026amp;title=Cluster+Upgrades\u0026amp;theme=7628870a42004e67b5b3df3d\u0026amp;signature=809198893a106a482a688d20aa896d838547c6fad79846c7dac9c70b203cc9df\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cockroachlabs/c9BlkJ0WBi2Ma7w-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"CockroachDB\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9059FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/v24.1/upgrade-cockroachdb-kubernetes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cockroachlabs.com/#organization\",\"name\":\"CockroachDB\",\"url\":\"https://docs.cockroachlabs.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cockroachlabs/4WvUnbVuGZfqM4kW/images/CockroachLabs_Wordmark_Black.png?fit=max\u0026auto=format\u0026n=4WvUnbVuGZfqM4kW\u0026q=85\u0026s=54ccae625c9986bf1df8ddc7b2c571f0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cockroachlabs.com#website\",\"name\":\"CockroachDB\",\"url\":\"https://docs.cockroachlabs.com\",\"publisher\":{\"@id\":\"https://docs.cockroachlabs.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes#webpage\",\"url\":\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes\",\"name\":\"Cluster Upgrades\",\"dateModified\":\"2026-10-24T02:19:55.934Z\",\"isPartOf\":{\"@id\":\"https://docs.cockroachlabs.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Self-Hosted Deployments\",\"item\":\"https://docs.cockroachlabs.com/docs/v24.1/recommended-production-settings\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deploy on Kubernetes with Legacy Technologies\",\"item\":\"https://docs.cockroachlabs.com/docs/v24.1/kubernetes-overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Operate on Kubernetes\",\"item\":\"https://docs.cockroachlabs.com/docs/v24.1/schedule-cockroachdb-kubernetes\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Cluster Upgrades\",\"item\":\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes#article\",\"headline\":\"Cluster Upgrades\",\"name\":\"Cluster Upgrades\",\"url\":\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cockroachlabs.com/docs/stable/upgrade-cockroachdb-kubernetes#webpage\"},\"dateModified\":\"2026-10-24T02:19:55.934Z\",\"publisher\":{\"@id\":\"https://docs.cockroachlabs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cockroachlabs.com#website\"}}]}\u003c/script>","siteName":"CockroachDB","nav":{"global":{"anchors":[{"anchor":"University","icon":"graduation-cap","href":"https://learn.cockroachlabs.com/"}]},"products":[{"product":"Cockroach Continuum Cloud","icon":"https://mintlify.s3.us-west-1.amazonaws.com/cockroachlabs/images/continuum/cockroachlabs-symbol.svg","description":"The agentic database cloud","pages":[{"title":"Cockroach Continuum Cloud","href":"/docs/continuum"}]},{"product":"CockroachDB","icon":"database","description":"Distributed SQL database","versions":[{"version":"v26.4","tag":"Development","pages":[{"title":"v26.4","href":"/docs/v26.4/upgrade-cockroachdb-kubernetes"}]},{"version":"v26.3","default":true,"tag":"Stable","pages":[{"title":"v26.3","href":"/docs/stable/upgrade-cockroachdb-kubernetes"}]},{"version":"v26.2","pages":[{"title":"v26.2","href":"/docs/v26.2/upgrade-cockroachdb-kubernetes"}]},{"version":"v26.1","pages":[{"title":"v26.1","href":"/docs/v26.1/upgrade-cockroachdb-kubernetes"}]},{"version":"v25.4","tag":"LTS","pages":[{"title":"v25.4","href":"/docs/v25.4/upgrade-cockroachdb-kubernetes"}]},{"version":"v25.3","tag":"Unsupported","pages":[{"title":"v25.3","href":"/docs/v25.3/upgrade-cockroachdb-kubernetes"}]},{"version":"v25.2","tag":"LTS","pages":[{"title":"v25.2","href":"/docs/v25.2/upgrade-cockroachdb-kubernetes"}]},{"version":"v25.1","tag":"Unsupported","pages":[{"title":"v25.1","href":"/docs/v25.1/upgrade-cockroachdb-kubernetes"}]},{"version":"v24.3","tag":"LTS","pages":[{"title":"v24.3","href":"/docs/v24.3/upgrade-cockroachdb-kubernetes"}]},{"version":"v24.1","tag":"LTS","tabs":[{"tab":"Docs","icon":"book-open","pages":[{"title":"CockroachDB Docs","sidebarTitle":"Docs Home","href":"/docs/v24.1"},{"group":"Get Started","pages":[{"group":"Install CockroachDB","pages":[{"title":"Install CockroachDB on Mac","href":"/docs/v24.1/install-cockroachdb-mac"},{"title":"Install CockroachDB on Linux","href":"/docs/v24.1/install-cockroachdb-linux"},{"title":"Install a FIPS-ready CockroachDB Runtime","href":"/docs/v24.1/fips"},{"title":"Install CockroachDB on Windows","href":"/docs/v24.1/install-cockroachdb-windows"}]},{"group":"Develop with CockroachDB","pages":[{"title":"Developer Basics","href":"/docs/v24.1/developer-basics"},{"group":"JavaScript/TypeScript","pages":[{"title":"Build a Simple CRUD Node.js App with CockroachDB and the node-postgres Driver","href":"/docs/v24.1/build-a-nodejs-app-with-cockroachdb"},{"title":"Build a Node.js App with CockroachDB and Sequelize","href":"/docs/v24.1/build-a-nodejs-app-with-cockroachdb-sequelize"},{"title":"Build a Simple CRUD Node.js App with CockroachDB and Knex.js","href":"/docs/v24.1/build-a-nodejs-app-with-cockroachdb-knexjs"},{"title":"Build a Simple CRUD Node.js App with CockroachDB and Prisma","href":"/docs/v24.1/build-a-nodejs-app-with-cockroachdb-prisma"},{"title":"Build a TypeScript App with CockroachDB and TypeORM","href":"/docs/v24.1/build-a-typescript-app-with-cockroachdb"}]},{"group":"Python","pages":[{"title":"Build a Python App with CockroachDB and Psycopg 3","href":"/docs/v24.1/build-a-python-app-with-cockroachdb-psycopg3"},{"title":"Build a Python App with CockroachDB and psycopg2","href":"/docs/v24.1/build-a-python-app-with-cockroachdb"},{"title":"Build a Simple CRUD Python App with CockroachDB and SQLAlchemy","href":"/docs/v24.1/build-a-python-app-with-cockroachdb-sqlalchemy"},{"title":"Build a Python App with CockroachDB and Django","href":"/docs/v24.1/build-a-python-app-with-cockroachdb-django"},{"title":"Build a Python App with CockroachDB and asyncpg","href":"/docs/v24.1/build-a-python-app-with-cockroachdb-asyncpg"}]},{"group":"Golang","pages":[{"title":"Build a Simple CRUD Go App with CockroachDB and the Go pgx Driver","href":"/docs/v24.1/build-a-go-app-with-cockroachdb"},{"title":"Build a Go App with CockroachDB and GORM","href":"/docs/v24.1/build-a-go-app-with-cockroachdb-gorm"},{"title":"Build a Go App with CockroachDB the Go pq Driver","href":"/docs/v24.1/build-a-go-app-with-cockroachdb-pq"},{"title":"Build a Go App with CockroachDB and upper/db","href":"/docs/v24.1/build-a-go-app-with-cockroachdb-upperdb"}]},{"group":"Java","pages":[{"title":"Build a Simple CRUD Java App with CockroachDB and JDBC","href":"/docs/v24.1/build-a-java-app-with-cockroachdb"},{"title":"Build a Java App with CockroachDB and Hibernate","href":"/docs/v24.1/build-a-java-app-with-cockroachdb-hibernate"},{"title":"Build a Java App with CockroachDB and jOOQ","href":"/docs/v24.1/build-a-java-app-with-cockroachdb-jooq"},{"title":"Build a Spring App with CockroachDB and MyBatis","href":"/docs/v24.1/build-a-spring-app-with-cockroachdb-mybatis"},{"title":"Build a Spring App with CockroachDB and JDBC","href":"/docs/v24.1/build-a-spring-app-with-cockroachdb-jdbc"},{"title":"Build a Spring App with CockroachDB and JPA","href":"/docs/v24.1/build-a-spring-app-with-cockroachdb-jpa"}]},{"group":"Ruby","pages":[{"title":"Build a Ruby App with CockroachDB and the Ruby pg Driver","href":"/docs/v24.1/build-a-ruby-app-with-cockroachdb"},{"title":"Build a Ruby App with CockroachDB and Active Record","href":"/docs/v24.1/build-a-ruby-app-with-cockroachdb-activerecord"}]},{"title":"Build a C# App with CockroachDB and the .NET Npgsql Driver","sidebarTitle":"C# (.NET)","href":"/docs/v24.1/build-a-csharp-app-with-cockroachdb"},{"title":"Build a Rust App with CockroachDB and the Rust-Postgres Driver","sidebarTitle":"Rust","href":"/docs/v24.1/build-a-rust-app-with-cockroachdb"},{"title":"Build a GraphQL Application Using Hasura","sidebarTitle":"Hasura (GraphQL)","href":"/docs/v24.1/hasura-getting-started"}]},{"group":"Standard Examples","pages":[{"title":"Create and Deploy an AWS Lambda Function Built on CockroachDB","sidebarTitle":"AWS Lambda","href":"/docs/v24.1/deploy-lambda-function"},{"title":"Deploy a CockroachDB Cloud Application with Google Cloud Run","sidebarTitle":"Google Cloud Run","href":"/docs/v24.1/deploy-app-gcr"},{"title":"Deploy a Netlify App Built on CockroachDB","sidebarTitle":"Netlify","href":"/docs/v24.1/deploy-app-netlify"},{"title":"Deploy a Web App Built on CockroachDB with Vercel","sidebarTitle":"Vercel","href":"/docs/v24.1/deploy-app-vercel"},{"title":"Serverless Function Best Practices","href":"/docs/v24.1/serverless-function-best-practices"}]},{"title":"MovR","href":"/docs/v24.1/movr"}]},{"group":"CockroachDB and AI","pages":[{"title":"CockroachDB and AI","sidebarTitle":"Overview","href":"/docs/v24.1/cockroachdb-and-ai"},{"title":"Agent Skills for CockroachDB","href":"/docs/v24.1/agent-skills"},{"group":"CockroachDB MCP Server","pages":[{"title":"CockroachDB MCP Server","sidebarTitle":"Overview","href":"/docs/v24.1/cockroachdb-mcp-server"},{"title":"Install, Configure, and Connect to the CockroachDB MCP Server","sidebarTitle":"Install, Configure, and Connect","href":"/docs/v24.1/install-cockroachdb-mcp-server"},{"title":"CockroachDB MCP Server Reference","sidebarTitle":"Self-hosted MCP Server Reference","href":"/docs/v24.1/cockroachdb-mcp-server-reference"}]},{"title":"CockroachDB Docs MCP Server","sidebarTitle":"Docs MCP Server","href":"/docs/v24.1/docs-mcp-integration"}]},{"group":"Feature Overview","pages":[{"group":"CockroachDB Basics","pages":[{"title":"Why CockroachDB?","href":"/docs/v24.1/why-cockroachdb"},{"title":"Replication and Rebalancing","sidebarTitle":"Replication \u0026 Rebalancing","href":"/docs/v24.1/demo-replication-and-rebalancing"},{"title":"Fault Tolerance \u0026 Recovery","href":"/docs/v24.1/demo-fault-tolerance-and-recovery"},{"title":"Serializable Transactions","href":"/docs/v24.1/demo-serializable"},{"title":"Multi-Active Availability","href":"/docs/v24.1/multi-active-availability"}]},{"group":"CockroachDB SQL","pages":[{"title":"PostgreSQL Compatibility","href":"/docs/v24.1/postgresql-compatibility"},{"title":"SQL Feature Support in CockroachDB v24.1","sidebarTitle":"SQL Features","href":"/docs/v24.1/sql-feature-support"},{"title":"SQL FAQs","href":"/docs/v24.1/sql-faqs"}]}]},{"group":"Data Resilience","pages":[{"title":"Disaster Recovery Overview","sidebarTitle":"Disaster Recovery","href":"/docs/v24.1/disaster-recovery-overview"}]},{"group":"Connect to an Application","pages":[{"title":"Install a Driver or ORM Framework","href":"/docs/v24.1/install-client-drivers"},{"title":"Connect to a CockroachDB Cluster","sidebarTitle":"Connect to a Cluster","href":"/docs/v24.1/connect-to-the-database"},{"title":"Client Connection Parameters","href":"/docs/v24.1/connection-parameters"},{"title":"Connection Pooling","href":"/docs/v24.1/connection-pooling"}]},{"group":"Self-Hosted Deployments","pages":[{"title":"Production Checklist","href":"/docs/v24.1/recommended-production-settings"},{"title":"Deployment \u0026 Operations Skills Taxonomy","sidebarTitle":"Deployment and Operations Skills Taxonomy","href":"/docs/v24.1/deployment-operations-skills-taxonomy"},{"group":"Deploy Locally","pages":[{"group":"Deploy from Binary","pages":[{"title":"Deploy a Local Cluster from Binary (Secure)","href":"/docs/v24.1/secure-a-cluster"},{"title":"Deploy a Local Cluster from Binary (Insecure)","href":"/docs/v24.1/start-a-local-cluster"}]},{"group":"Deploy in Docker","pages":[{"title":"Deploy a Local Cluster in Docker (Insecure)","href":"/docs/v24.1/start-a-local-cluster-in-docker-mac"},{"title":"Deploy a Local Cluster in Docker (Insecure)","href":"/docs/v24.1/start-a-local-cluster-in-docker-linux"},{"title":"Deploy a Local Cluster in Docker (Insecure)","href":"/docs/v24.1/start-a-local-cluster-in-docker-windows"}]},{"group":"Deploy in Kubernetes","pages":[{"title":"Deploy a Local Cluster in Kubernetes","href":"/docs/v24.1/orchestrate-a-local-cluster-with-kubernetes"},{"title":"Orchestration with Kubernetes (Insecure)","href":"/docs/v24.1/orchestrate-a-local-cluster-with-kubernetes-insecure"}]},{"title":"Simulate a Multi-Region Cluster on localhost (Insecure)","sidebarTitle":"Simulate a Multi-Region Cluster Locally","href":"/docs/v24.1/simulate-a-multi-region-cluster-on-localhost"}]},{"group":"Deploy Manually","pages":[{"title":"Manual Deployment","sidebarTitle":"Overview","href":"/docs/v24.1/manual-deployment"},{"title":"Deploy CockroachDB On-Premises","sidebarTitle":"Deploy On-Premises","href":"/docs/v24.1/deploy-cockroachdb-on-premises"},{"title":"Deploy CockroachDB On-Premises (Insecure)","href":"/docs/v24.1/deploy-cockroachdb-on-premises-insecure"},{"title":"Deploy CockroachDB on AWS EC2","sidebarTitle":"Deploy on AWS","href":"/docs/v24.1/deploy-cockroachdb-on-aws"},{"title":"Deploy CockroachDB on AWS EC2 (Insecure)","href":"/docs/v24.1/deploy-cockroachdb-on-aws-insecure"},{"title":"Deploy CockroachDB on Microsoft Azure","sidebarTitle":"Deploy on Azure","href":"/docs/v24.1/deploy-cockroachdb-on-microsoft-azure"},{"title":"Deploy CockroachDB on Microsoft Azure (Insecure)","href":"/docs/v24.1/deploy-cockroachdb-on-microsoft-azure-insecure"},{"title":"Deploy CockroachDB on Google Cloud Platform GCE","sidebarTitle":"Deploy on Google Cloud Platform GCE","href":"/docs/v24.1/deploy-cockroachdb-on-google-cloud-platform"},{"title":"Deploy CockroachDB on Google Cloud Platform GCE (Insecure)","href":"/docs/v24.1/deploy-cockroachdb-on-google-cloud-platform-insecure"},{"title":"Deploy CockroachDB on Digital Ocean","sidebarTitle":"Deploy on Digital Ocean","href":"/docs/v24.1/deploy-cockroachdb-on-digital-ocean"},{"title":"Deploy CockroachDB on Digital Ocean (Insecure)","href":"/docs/v24.1/deploy-cockroachdb-on-digital-ocean-insecure"}]},{"group":"Deploy on Kubernetes with Legacy Technologies","pages":[{"title":"Kubernetes Overview","sidebarTitle":"Overview","href":"/docs/v24.1/kubernetes-overview"},{"title":"Deploy CockroachDB in a Single Kubernetes Cluster","href":"/docs/v24.1/deploy-cockroachdb-with-kubernetes"},{"title":"Deploy CockroachDB in a Single Kubernetes Cluster (Insecure)","href":"/docs/v24.1/deploy-cockroachdb-with-kubernetes-insecure"},{"title":"Deploy CockroachDB on Red Hat OpenShift","sidebarTitle":"OpenShift Deployment","href":"/docs/v24.1/deploy-cockroachdb-with-kubernetes-openshift"},{"title":"Orchestrate CockroachDB Across Multiple Kubernetes Clusters","sidebarTitle":"Multi-Cluster Deployment","href":"/docs/v24.1/orchestrate-cockroachdb-with-kubernetes-multi-cluster"},{"group":"Operate on Kubernetes","pages":[{"title":"Pod Scheduling","href":"/docs/v24.1/schedule-cockroachdb-kubernetes"},{"title":"Resource Management","href":"/docs/v24.1/configure-cockroachdb-kubernetes"},{"title":"Certificate Management","href":"/docs/v24.1/secure-cockroachdb-kubernetes"},{"title":"Cluster Scaling","href":"/docs/v24.1/scale-cockroachdb-kubernetes"},{"title":"Cluster Monitoring","description":null,"href":"/docs/v24.1/monitor-cockroachdb-kubernetes"},{"title":"Cluster Upgrades","href":"/docs/v24.1/upgrade-cockroachdb-kubernetes"},{"title":"CockroachDB Performance on Kubernetes","sidebarTitle":"Kubernetes Performance","description":null,"href":"/docs/v24.1/kubernetes-performance"}]}]},{"group":"Multi-Region for Self-Hosted Deployments","pages":[{"title":"Topology Patterns Overview","href":"/docs/v24.1/topology-patterns"},{"title":"Basic Production Topology","href":"/docs/v24.1/topology-basic-production"},{"title":"Follower Reads Topology","href":"/docs/v24.1/topology-follower-reads"},{"title":"Follow-the-Workload Topology","href":"/docs/v24.1/topology-follow-the-workload"},{"title":"Regional Tables","href":"/docs/v24.1/regional-tables"},{"title":"Global Tables","href":"/docs/v24.1/global-tables"}]},{"group":"Security","pages":[{"group":"Certificates","pages":[{"title":"Use the CockroachDB CLI to provision a development cluster","href":"/docs/v24.1/manage-certs-cli"},{"title":"Manage PKI certificates with HashiCorp Vault","href":"/docs/v24.1/manage-certs-vault"},{"title":"Create Security Certificates using OpenSSL","href":"/docs/v24.1/create-security-certificates-openssl"},{"title":"Advanced Public Key Infrastructure (PKI) Certificate Scenarios","href":"/docs/v24.1/create-security-certificates-custom-ca"},{"title":"Using Online Certificate Status Protocol (OCSP) with CockroachDB","sidebarTitle":"Use Online Certificate Status Protocol (OCSP)","href":"/docs/v24.1/manage-certs-revoke-ocsp"},{"title":"Certificate-based authentication using multiple values from the X.509 Subject field","sidebarTitle":"Certificate-based authentication using multiple values from the X.509 SUBJECT field","href":"/docs/v24.1/certificate-based-authentication-using-the-x509-subject-field"}]},{"title":"Authenticate to CockroachDB Self-Hosted Clusters","sidebarTitle":"Authentication","href":"/docs/v24.1/authentication"},{"title":"Manage Encryption for CockroachDB Self-Hosted Clusters","sidebarTitle":"Encryption","href":"/docs/v24.1/encryption"},{"title":"Manage Cluster User Authorization","sidebarTitle":"Authorization","href":"/docs/v24.1/authorization"},{"title":"Table-based SQL Audit Logging","href":"/docs/v24.1/sql-audit-logging"},{"title":"Role-based SQL Audit Logging","href":"/docs/v24.1/role-based-audit-logging"},{"title":"GSSAPI Authentication (Enterprise)","sidebarTitle":"GSSAPI Authentication","href":"/docs/v24.1/gssapi_authentication"},{"title":"Cluster Single Sign-on (SSO) using JSON Web Tokens (JWTs)","sidebarTitle":"Cluster SSO using JWT","href":"/docs/v24.1/sso-sql"},{"title":"Single Sign-on (SSO) for DB Console","sidebarTitle":"DB Console SSO","href":"/docs/v24.1/sso-db-console"},{"title":"Rotate Security Certificates","href":"/docs/v24.1/rotate-certificates"},{"title":"Use HashiCorp Vault's Dynamic Secrets","sidebarTitle":"Use Hashicorp Vault's Dynamic Secrets","href":"/docs/v24.1/vault-db-secrets-tutorial"}]},{"group":"Monitoring and Alerting","pages":[{"title":"Monitoring and Alerting","sidebarTitle":"Overview","href":"/docs/v24.1/monitoring-and-alerting"},{"title":"Common Issues to Monitor","href":"/docs/v24.1/common-issues-to-monitor"},{"title":"Enable the Node Map","href":"/docs/v24.1/enable-node-map"},{"title":"Monitor CockroachDB with Prometheus","sidebarTitle":"Use Prometheus and Alertmanager","href":"/docs/v24.1/monitor-cockroachdb-with-prometheus"},{"title":"Essential Metrics for CockroachDB Self-Hosted Deployments","sidebarTitle":"Essential Metrics for CockroachDB self-hosted Deployments","href":"/docs/v24.1/essential-metrics-self-hosted"},{"title":"Essential Alerts for CockroachDB Self-Hosted Deployments","sidebarTitle":"Essential Alerts for CockroachDB self-hosted Deployments","href":"/docs/v24.1/essential-alerts-self-hosted"}]},{"group":"Administration","pages":[{"title":"DB Console Overview","href":"/docs/v24.1/ui-overview"},{"title":"Cluster Overview Page","href":"/docs/v24.1/ui-cluster-overview-page"},{"group":"Metrics Dashboards","pages":[{"title":"Overview Dashboard","sidebarTitle":"Overview","href":"/docs/v24.1/ui-overview-dashboard"},{"title":"Hardware Dashboard","sidebarTitle":"Hardware","href":"/docs/v24.1/ui-hardware-dashboard"},{"title":"Runtime Dashboard","sidebarTitle":"Runtime","href":"/docs/v24.1/ui-runtime-dashboard"},{"title":"Networking Dashboard","sidebarTitle":"Networking","href":"/docs/v24.1/ui-networking-dashboard"},{"title":"SQL Dashboard","sidebarTitle":"SQL","href":"/docs/v24.1/ui-sql-dashboard"},{"title":"Storage Dashboard","sidebarTitle":"Storage","href":"/docs/v24.1/ui-storage-dashboard"},{"title":"Replication Dashboard","sidebarTitle":"Replication","href":"/docs/v24.1/ui-replication-dashboard"},{"title":"Distributed Dashboard","sidebarTitle":"Distributed","href":"/docs/v24.1/ui-distributed-dashboard"},{"title":"Queues Dashboard","sidebarTitle":"Queues","href":"/docs/v24.1/ui-queues-dashboard"},{"title":"Slow Requests Dashboard","sidebarTitle":"Slow Requests","href":"/docs/v24.1/ui-slow-requests-dashboard"},{"title":"Changefeeds Dashboard","sidebarTitle":"Changefeeds","href":"/docs/v24.1/ui-cdc-dashboard"},{"title":"Overload Dashboard","sidebarTitle":"Overload","href":"/docs/v24.1/ui-overload-dashboard"},{"title":"TTL Dashboard","sidebarTitle":"TTL","href":"/docs/v24.1/ui-ttl-dashboard"},{"title":"Physical Cluster Replication Dashboard","sidebarTitle":"Physical Cluster Replication","href":"/docs/v24.1/ui-physical-cluster-replication-dashboard"},{"title":"Custom Chart Debug Page","href":"/docs/v24.1/ui-custom-chart-debug-page"}]},{"title":"Databases Page","href":"/docs/v24.1/ui-databases-page"},{"title":"Sessions Page","href":"/docs/v24.1/ui-sessions-page"},{"title":"Statements Page","href":"/docs/v24.1/ui-statements-page"},{"title":"Transactions Page","href":"/docs/v24.1/ui-transactions-page"},{"title":"Insights Page","href":"/docs/v24.1/ui-insights-page"},{"title":"Network Page","href":"/docs/v24.1/ui-network-latency-page"},{"title":"Jobs Page","href":"/docs/v24.1/ui-jobs-page"},{"title":"Schedules Page","href":"/docs/v24.1/ui-schedules-page"},{"title":"Advanced Debug Page","href":"/docs/v24.1/ui-debug-pages"},{"title":"Key Visualizer","href":"/docs/v24.1/ui-key-visualizer"},{"title":"WAL Failover","href":"/docs/v24.1/wal-failover"}]},{"group":"Backups and Restores","pages":[{"title":"Backup and Restore Overview","sidebarTitle":"Overview","href":"/docs/v24.1/backup-and-restore-overview"},{"title":"Take Full and Incremental Backups","sidebarTitle":"Full and Incremental Backups","href":"/docs/v24.1/take-full-and-incremental-backups"},{"title":"Take Backups with Revision History and Restore from a Point-in-time","sidebarTitle":"Backups with Revision History and Point-in-time Restore","href":"/docs/v24.1/take-backups-with-revision-history-and-restore-from-a-point-in-time"},{"title":"Take and Restore Encrypted Backups","sidebarTitle":"Encrypted Backup and Restore","href":"/docs/v24.1/take-and-restore-encrypted-backups"},{"title":"Take Locality-restricted Backups","sidebarTitle":"Locality-restricted Backup Execution","href":"/docs/v24.1/take-locality-restricted-backups"},{"title":"Take and Restore Locality-aware Backups","sidebarTitle":"Locality-aware Backup and Restore","href":"/docs/v24.1/take-and-restore-locality-aware-backups"},{"title":"Manage a Backup Schedule","sidebarTitle":"Scheduled Backups","href":"/docs/v24.1/manage-a-backup-schedule"},{"title":"Backup Validation","href":"/docs/v24.1/backup-validation"},{"title":"Expire Past Backups","href":"/docs/v24.1/expire-past-backups"},{"title":"Backup and Restore Monitoring","href":"/docs/v24.1/backup-and-restore-monitoring"}]},{"group":"File Storage","pages":[{"title":"Use Cloud Storage","sidebarTitle":"Cloud Storage","href":"/docs/v24.1/use-cloud-storage"},{"title":"Cloud Storage Authentication","href":"/docs/v24.1/cloud-storage-authentication"},{"title":"Use Userfile Storage","sidebarTitle":"Userfile Storage","href":"/docs/v24.1/use-userfile-storage"},{"title":"Use a Local File Server","sidebarTitle":"Local File Server","href":"/docs/v24.1/use-a-local-file-server"}]},{"group":"Cluster Maintenance","pages":[{"title":"Upgrade to CockroachDB v24.1","sidebarTitle":"Upgrade CockroachDB","href":"/docs/v24.1/upgrade-cockroach-version"},{"title":"Disaster Recovery Planning","href":"/docs/v24.1/disaster-recovery-planning"},{"title":"Restoring Backups Across Versions","href":"/docs/v24.1/restoring-backups-across-versions"},{"title":"Manage Long-Running Queries","href":"/docs/v24.1/manage-long-running-queries"},{"title":"Node Shutdown","href":"/docs/v24.1/node-shutdown"}]},{"group":"Logs","pages":[{"title":"Logging Overview","sidebarTitle":"Overview","href":"/docs/v24.1/logging-overview"},{"title":"Configure Logs","href":"/docs/v24.1/configure-logs"},{"title":"Logging Use Cases","href":"/docs/v24.1/logging-use-cases"},{"title":"Log SQL Activity to Datadog","href":"/docs/v24.1/log-sql-activity-to-datadog"}]},{"title":"Cluster API v2.0","sidebarTitle":"Cluster API","href":"/docs/v24.1/cluster-api"}]},{"group":"Schema Design","pages":[{"title":"Database Schemas","href":"/docs/v24.1/schema-design-overview"},{"title":"Computed Columns","href":"/docs/v24.1/computed-columns"},{"title":"Column Families","href":"/docs/v24.1/column-families"},{"title":"Scale to Multiple Regions","href":"/docs/v24.1/multiregion-scale-application"},{"group":"Indexes","pages":[{"title":"Secondary Indexes","href":"/docs/v24.1/schema-design-indexes"},{"title":"Index a Subset of Rows with Partial Indexes","sidebarTitle":"Partial Indexes","href":"/docs/v24.1/partial-indexes"},{"title":"Index Sequential Keys with Hash-sharded Indexes","sidebarTitle":"Hash-sharded Indexes","href":"/docs/v24.1/hash-sharded-indexes"},{"title":"Generalized Inverted Indexes","href":"/docs/v24.1/inverted-indexes"},{"title":"Full-Text Search","href":"/docs/v24.1/full-text-search"},{"title":"Trigram Indexes","href":"/docs/v24.1/trigram-indexes"},{"title":"Expression Indexes","href":"/docs/v24.1/expression-indexes"},{"title":"Spatial Indexes","href":"/docs/v24.1/spatial-indexes"}]},{"group":"Update a Database Schema","pages":[{"title":"Online Schema Changes","href":"/docs/v24.1/online-schema-changes"},{"title":"Migrate CockroachDB Schemas with Alembic","sidebarTitle":"Use Alembic","href":"/docs/v24.1/alembic"},{"title":"Migrate CockroachDB Schemas with Flyway","sidebarTitle":"Use Flyway","href":"/docs/v24.1/flyway"},{"title":"Migrate CockroachDB Schemas with Liquibase","sidebarTitle":"Use Liquibase","href":"/docs/v24.1/liquibase"}]}]},{"group":"Reads and Writes","pages":[{"title":"Reads and Writes in CockroachDB","sidebarTitle":"Overview","href":"/docs/v24.1/architecture/reads-and-writes-overview"},{"group":"Read Data","pages":[{"title":"Query Data","href":"/docs/v24.1/query-data"},{"title":"Reusable Views","href":"/docs/v24.1/views"},{"title":"Subqueries","href":"/docs/v24.1/subqueries"},{"title":"Temporary Tables","href":"/docs/v24.1/temporary-tables"},{"title":"Paginate Results","href":"/docs/v24.1/pagination"},{"title":"Follower Reads","href":"/docs/v24.1/follower-reads"},{"title":"AS OF SYSTEM TIME","sidebarTitle":"AS OF SYSTEM TIME","href":"/docs/v24.1/as-of-system-time"},{"title":"Query Spatial Data","href":"/docs/v24.1/query-spatial-data"}]},{"group":"Write Data","pages":[{"title":"Insert Data","href":"/docs/v24.1/insert-data"},{"title":"Update Data","href":"/docs/v24.1/update-data"},{"title":"Bulk-update Data","href":"/docs/v24.1/bulk-update-data"},{"title":"Delete Data","href":"/docs/v24.1/delete-data"},{"title":"Bulk-delete Data","href":"/docs/v24.1/bulk-delete-data"},{"title":"Batch Delete Expired Data with Row-Level TTL","href":"/docs/v24.1/row-level-ttl"}]},{"group":"Transactions","pages":[{"title":"Transactions","sidebarTitle":"Overview","href":"/docs/v24.1/transactions"},{"title":"Advanced Client-side Transaction Retries","href":"/docs/v24.1/advanced-client-side-transaction-retries"},{"title":"Life of a Distributed Transaction","href":"/docs/v24.1/architecture/life-of-a-distributed-transaction"},{"title":"Read Committed Transactions","href":"/docs/v24.1/read-committed"}]},{"title":"Test Your Application Locally","href":"/docs/v24.1/local-testing"},{"url":"https://www.cockroachlabs.com/docs/tutorials/sql-playground","title":"SQL Playground","href":"/links/tutorials/sql-playground"},{"group":"Database Management Tools","pages":[{"title":"Visualize CockroachDB Schemas with DBeaver","sidebarTitle":"DBeaver GUI","href":"/docs/v24.1/dbeaver"},{"title":"Use IntelliJ IDEA with CockroachDB","sidebarTitle":"IntelliJ IDEA","href":"/docs/v24.1/intellij-idea"}]},{"title":"JSON Support","href":"/docs/v24.1/demo-json-support"}]},{"group":"Stream Data","pages":[{"title":"Change Data Capture Overview","href":"/docs/v24.1/change-data-capture-overview"},{"group":"Get Started with Changefeeds","pages":[{"title":"Create and Configure Changefeeds","href":"/docs/v24.1/create-and-configure-changefeeds"},{"group":"Changefeed Messages","pages":[{"title":"Changefeed Messages","sidebarTitle":"Overview","href":"/docs/v24.1/changefeed-messages"}]},{"title":"Changefeed Sinks","href":"/docs/v24.1/changefeed-sinks"},{"title":"Changefeed Examples","href":"/docs/v24.1/changefeed-examples"}]},{"group":"Monitor Changefeeds","pages":[{"title":"Monitor and Debug Changefeeds","sidebarTitle":"Overview","href":"/docs/v24.1/monitor-and-debug-changefeeds"},{"title":"Protect Changefeed Data from Garbage Collection","sidebarTitle":"Protect Changefeed Data","href":"/docs/v24.1/protect-changefeed-data"}]},{"group":"Optimize Changefeeds","pages":[{"title":"Change Data Capture Queries","href":"/docs/v24.1/cdc-queries"},{"title":"Changefeeds on Tables with Column Families","href":"/docs/v24.1/changefeeds-on-tables-with-column-families"},{"title":"Export Data with Changefeeds","href":"/docs/v24.1/export-data-with-changefeeds"},{"title":"Changefeeds in Multi-Region Deployments","href":"/docs/v24.1/changefeeds-in-multi-region-deployments"}]},{"group":"Changefeed Tutorials","pages":[{"title":"Connect to a Changefeed Kafka Sink with OAuth Using Okta","href":"/docs/v24.1/connect-to-a-changefeed-kafka-sink-with-oauth-using-okta"},{"title":"Stream a Changefeed to a Confluent Cloud Kafka Cluster","href":"/docs/v24.1/stream-a-changefeed-to-a-confluent-cloud-kafka-cluster"}]},{"title":"Advanced Changefeed Configuration","href":"/docs/v24.1/advanced-changefeed-configuration"}]},{"group":"Cross-Cluster Replication","pages":[{"group":"Physical Cluster Replication","pages":[{"title":"Physical Cluster Replication","sidebarTitle":"Overview","href":"/docs/v24.1/physical-cluster-replication-overview"},{"title":"Set Up Physical Cluster Replication","href":"/docs/v24.1/set-up-physical-cluster-replication"},{"title":"Fail Over from a Primary Cluster to a Standby Cluster","sidebarTitle":"Fail Over from a Primary to a Standby Cluster","href":"/docs/v24.1/failover-replication"},{"title":"Physical Cluster Replication Monitoring","sidebarTitle":"Monitor a Replication Stream","href":"/docs/v24.1/physical-cluster-replication-monitoring"},{"title":"Physical Cluster Replication Technical Overview","sidebarTitle":"Technical Overview","href":"/docs/v24.1/physical-cluster-replication-technical-overview"},{"group":"Cluster Virtualization","pages":[{"title":"Cluster Virtualization Overview","sidebarTitle":"Overview","href":"/docs/v24.1/cluster-virtualization-overview"},{"title":"Work with virtual clusters","sidebarTitle":"Work with Virtual Clusters","href":"/docs/v24.1/work-with-virtual-clusters"},{"title":"Cluster Setting Scopes with Cluster Virtualization enabled","sidebarTitle":"Setting Scopes","href":"/docs/v24.1/cluster-virtualization-setting-scopes"},{"title":"Cluster Metric Scopes with Cluster Virtualization enabled","sidebarTitle":"Metric Scopes","href":"/docs/v24.1/cluster-virtualization-metric-scopes"}]}]}]},{"group":"Multi-Region Capabilities","pages":[{"title":"Multi-Region Capabilities Overview","sidebarTitle":"Overview","href":"/docs/v24.1/multiregion-overview"},{"title":"Multi-Region Survival Goals","sidebarTitle":"Survival Goals","href":"/docs/v24.1/multiregion-survival-goals"},{"group":"Data Domiciling and Performance","pages":[{"title":"Table Localities","href":"/docs/v24.1/table-localities"},{"title":"Table Partitioning","href":"/docs/v24.1/partitioning"},{"title":"Data Domiciling with CockroachDB","sidebarTitle":"Data Domiciling with CockroachDB Tutorial","href":"/docs/v24.1/data-domiciling"}]},{"title":"How to Choose a Multi-Region Configuration","href":"/docs/v24.1/choosing-a-multi-region-configuration"},{"title":"Multi-Region Zone Config Extensions","href":"/docs/v24.1/zone-config-extensions"},{"group":"Multi-Region Tutorials","pages":[{"title":"Low Latency Reads and Writes in a Multi-Region Cluster","sidebarTitle":"Low Latency Reads and Writes","href":"/docs/v24.1/demo-low-latency-multi-region-deployment"},{"title":"Migrate to Multi-Region SQL","sidebarTitle":"Migrate to Multi-Region SQL with Replication Zones","href":"/docs/v24.1/migrate-to-multiregion-sql"}]}]},{"group":"Optimize Performance","pages":[{"title":"Optimize Statement Performance Overview","sidebarTitle":"Overview","href":"/docs/v24.1/make-queries-fast"},{"title":"SQL Performance Best Practices","href":"/docs/v24.1/performance-best-practices-overview"},{"title":"Indexes","href":"/docs/v24.1/indexes"},{"title":"Map SQL Activity using an Application Name","href":"/docs/v24.1/map-sql-activity-to-app"},{"title":"Cost-Based Optimizer","href":"/docs/v24.1/cost-based-optimizer"},{"title":"Vectorized Query Execution","sidebarTitle":"Vectorized Execution Engine","href":"/docs/v24.1/vectorized-execution"},{"title":"Load-Based Splitting","href":"/docs/v24.1/load-based-splitting"},{"title":"Replication Controls","href":"/docs/v24.1/configure-replication-zones"},{"title":"Admission Control","href":"/docs/v24.1/admission-control"},{"title":"Performance Tuning Recipes","href":"/docs/v24.1/performance-recipes"},{"group":"Performance Tuning Tutorials","pages":[{"title":"Statement Tuning with EXPLAIN","sidebarTitle":"Statement Tuning with EXPLAIN","href":"/docs/v24.1/sql-tuning-with-explain"},{"title":"Apply SQL Statement Performance Rules","href":"/docs/v24.1/apply-statement-performance-rules"}]}]},{"group":"Integrate","pages":[{"title":"Integrate CockroachDB with Satori","sidebarTitle":"Integrate with Satori","href":"/docs/v24.1/satori-integration"}]}]},{"tab":"Migrate","icon":"arrow-right-arrow-left","pages":[{"title":"Migrate","href":"/docs/molt/migration-overview"}]},{"tab":"SQL","icon":"code","pages":[{"title":"SQL","href":"/docs/v24.1/sql-statements"}]},{"tab":"Reference","icon":"book","pages":[{"title":"Reference","href":"/docs/v24.1/architecture/glossary"}]},{"tab":"Cluster API","icon":"rocket","pages":[{"title":"Cluster API","href":"/docs/api/cluster"}]},{"tab":"Troubleshoot","icon":"bug","pages":[{"title":"Troubleshoot","href":"/docs/v24.1/troubleshooting-overview"}]}]},{"version":"v23.2","tag":"LTS","pages":[{"title":"v23.2","href":"/docs/v23.2/upgrade-cockroachdb-kubernetes"}]},{"version":"v23.1","tag":"Unsupported","pages":[{"title":"v23.1","href":"/docs/v23.1/upgrade-cockroachdb-kubernetes"}]}]},{"product":"Cloud Deployments","icon":"cloud","description":"Fully managed CockroachDB","pages":[{"title":"Cloud Deployments","href":"/docs/cockroachcloud"}]},{"product":"Releases","icon":"list","description":"Version history, support policy \u0026 advisories","pages":[{"title":"Releases","href":"/docs/releases"}]}]},"title":"Cluster Upgrades - CockroachDB","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":[],"chunks":[]}