On top of CockroachDB’s built-in automation, you can use a third-party orchestration system to simplify and automate even more of your operations, from deployment to scaling to overall cluster management.This page demonstrates a basic integration with the open-source Kubernetes orchestration system. Using either the CockroachDB Helm chart or a few configuration files, you’ll quickly create a 3-node local cluster. You’ll run some SQL commands against the cluster and then simulate node failure, watching how Kubernetes auto-restarts without the need for any manual intervention. You’ll then scale the cluster with a single command before shutting the cluster down, again with a single command.
To orchestrate a physically distributed cluster in production, see Orchestrated Deployments. To deploy a 30-day free CockroachDB Dedicated cluster instead of running CockroachDB yourself, see the Quickstart.
Using the Operator, you can give a new cluster an arbitrary number of labels. However, a cluster’s labels cannot be modified after it is deployed. To track the status of this limitation, refer to #993 in the Operator project’s issue tracker.
The CockroachDB Helm chart is currently not under active development, and no new features are planned. However, Cockroach Labs remains committed to fully supporting the Helm chart by addressing defects, providing security patches, and addressing breaking changes due to deprecations in Kubernetes APIs.A deprecation notice for the Helm chart will be provided to customers a minimum of 6 months in advance of actual deprecation.
Service Name Indication (SNI) is an extension to the TLS protocol which allows a client to indicate which hostname it is attempting to connect to at the start of the TCP handshake process. The server can present multiple certificates on the same IP address and TCP port number, and one server can serve multiple secure websites or API services even if they use different certificates.Due to its order of operations, the PostgreSQL wire protocol’s implementation of TLS is not compatible with SNI-based routing in the Kubernetes ingress controller. Instead, use a TCP load balancer for CockroachDB that is not shared with other services.
When starting Kubernetes, select machines with at least 4 vCPUs and 16 GiB of memory, and provision at least 2 vCPUs and 8 Gi of memory to CockroachDB per pod. These minimum settings are used by default in this deployment guide, and are appropriate for testing purposes only. On a production deployment, you should adjust the resource settings for your workload. For details, see Resource management.
Kubernetes deployments use external persistent volumes that are often replicated by the provider. CockroachDB replicates data automatically, and this redundant layer of replication can impact performance. Using local volumes may improve performance.
A pod is a group of one of more containers managed by Kubernetes. In this tutorial, all pods run on your local workstation. Each pod contains a single container that runs a single-node CockroachDB cluster. You’ll start with 3 pods and grow to 4.
A StatefulSet is a group of pods treated as stateful units, where each pod has distinguishable network identity and always binds back to the same persistent storage on restart.
A persistent volume is storage mounted in a pod and available to its containers. The lifetime of a persistent volume is decoupled from the lifetime of the pod that’s using it, ensuring that each CockroachDB node binds back to the same storage on restart. When using minikube, persistent volumes are external temporary directories that endure until they are manually deleted or until the entire Kubernetes cluster is deleted.
customresourcedefinition.apiextensions.k8s.io/crdbclusters.crdb.cockroachlabs.com created
By default, the Operator is configured to install in the cockroach-operator-system namespace and to manage CockroachDB instances for all namespaces on the cluster.
To use these defaults, apply the Operator manifest without modifying it:
To use a custom namespace, edit all instances of namespace: cockroach-operator-system with your desired namespace.
To limit the namespaces that will be monitored, set the WATCH_NAMESPACE environment variable in the Deployment pod spec. This can be set to a single namespace or a comma-delimited set of namespaces. When set, only those CrdbCluster resources in the supplied namespace(s) will be reconciled.
Apply your local version of the Operator manifest to the cluster:
kubectl apply -f operator.yaml
Set your current namespace to the one used by the Operator. For example, to use the Operator’s default namespace:
After a cluster managed by the Kubernetes operator is initialized, its Kubernetes labels cannot be modified. For more details, refer to Best practices.
Download example.yaml, a custom resource that tells the Operator how to configure the Kubernetes cluster.
By default, this custom resource specifies CPU and memory resources that are appropriate for the virtual machines used in this deployment example. On a production cluster, you should substitute values that are appropriate for your machines and workload. For details on configuring your deployment, see Configure the Cluster.
By default, the Operator will generate and sign 1 client and 1 node certificate to secure the cluster. This means that if you do not provide a CA, a cockroach-generated CA is used. If you want to authenticate using your own CA, specify the generated secrets in the custom resourcebefore proceeding to the next step.
Apply example.yaml:
$ kubectl apply -f example.yaml
The Operator will create a StatefulSet and initialize the nodes as a cluster.
crdbcluster.crdb.cockroachlabs.com/cockroachdb created
# Welcome to the CockroachDB SQL shell.# All statements must be terminated by a semicolon.# To exit, type: \q.## Server version: CockroachDB CCL v21.1.0 (x86_64-unknown-linux-gnu, built 2021/04/23 13:54:57, go1.13.14) (same version as client)# Cluster ID: a96791d9-998c-4683-a3d3-edbf425bbf11## Enter \? for a brief introduction.#root@cockroachdb-public:26257/defaultdb>
The port-forward command must be run on the same machine as the web browser in which you want to view the DB Console. If you have been running these commands from a cloud instance or other non-local shell, you will not be able to view the UI without configuring kubectl locally and running the above port-forward command on your local machine.
Go to https://localhost:8080 and log in with the username and password you created earlier.If you are using Google Chrome, and you are getting an error about not being able to reach localhost because its certificate has been revoked, go to chrome://flags/#allow-insecure-localhost, enable “Allow invalid certificates for resources loaded from localhost”, and then restart the browser. Enabling this Chrome feature degrades security for all sites running on localhost, not just CockroachDB’s DB Console, so be sure to enable the feature only temporarily.
In the UI, verify that the cluster is running as expected:
View the Node List to ensure that all nodes successfully joined the cluster.
Click the Databases tab on the left to verify that bank is listed.
The CockroachDB Helm chart is compatible with all Kubernetes versions that are supported by the Kubernetes project when cert-manager is used for mTLS.The CockroachDB Helm chart is currently not under active development, and no new features are planned. However, Cockroach Labs remains committed to fully supporting the Helm chart by addressing defects, providing security patches, and addressing breaking changes due to deprecations in Kubernetes APIs.A deprecation notice for the Helm chart will be provided to customers a minimum of 6 months in advance of actual deprecation.
If you are running a secure Helm deployment on Kubernetes 1.22 and later, you must migrate away from using the Kubernetes CA for cluster authentication. The recommended approach is to use cert-manager for certificate management. For details, refer to Deploy cert-manager for mTLS.
The cluster configuration is set in the Helm chart’s values file.
By default, the Helm chart specifies CPU and memory resources that are appropriate for the virtual machines used in this deployment example. On a production cluster, you should substitute values that are appropriate for your machines and workload. For details on configuring your deployment, see Configure the Cluster.
Before deploying, modify some parameters in our Helm chart’s values file:
Create a local YAML file (e.g., my-values.yaml ) to specify your custom values. These will be used to override the defaults in values.yaml.
To avoid running out of memory when CockroachDB is not the only pod on a Kubernetes node, you must set memory limits explicitly. This is because CockroachDB does not detect the amount of memory allocated to its pod when run in Kubernetes. We recommend setting conf.cache and conf.max-sql-memory each to 1/4 of the memory allocation specified in statefulset.resources.requests and statefulset.resources.limits.
For example, if you are allocating 8Gi of memory to each CockroachDB node, allocate 2Gi to cache and 2Gi to max-sql-memory.
conf: cache: "2Gi" max-sql-memory: "2Gi"
The Helm chart defaults to a secure deployment by automatically setting tls.enabled to true.
By default, the Helm chart will generate and sign 1 client and 1 node certificate to secure the cluster. To authenticate using your own CA, see Certificate management.
Install the CockroachDB Helm chart, specifying your custom values file.Provide a “release” name to identify and track this particular deployment of the chart, and override the default values with those in my-values.yaml.
This tutorial uses my-release as the release name. If you use a different value, be sure to adjust the release name in subsequent commands.
To allow the CockroachDB pods to successfully deploy, do not set the --wait flag when using Helm commands.
Behind the scenes, this command uses our cockroachdb-statefulset.yaml file to create the StatefulSet that automatically creates 3 pods, each with a CockroachDB node running inside it, where each pod has distinguishable network identity and always binds back to the same persistent storage on restart.
Confirm that CockroachDB cluster initialization has completed successfully, with the pods for CockroachDB showing 1/1 under READY and the pod for initialization showing COMPLETED under STATUS:
Confirm that the persistent volumes and corresponding claims were created successfully for all three pods:
$ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGEpvc-71019b3a-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-0 standard 11mpvc-7108e172-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-1 standard 11mpvc-710dcb66-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-2 standard 11m
The StatefulSet configuration sets all CockroachDB nodes to log to stderr, so if you ever need access to logs for a pod, use kubectl logs <podname> rather than checking the log on the persistent volume.
To use the CockroachDB SQL client, first launch a secure pod running the cockroach binary.From your local workstation, use our client-secure.yaml file to launch a pod and keep it running indefinitely.
# Welcome to the cockroach SQL interface.# All statements must be terminated by a semicolon.# To exit: CTRL + D.## Client version: CockroachDB CCL v19.1.0 (x86_64-unknown-linux-gnu, built 2019/04/29 18:36:40, go1.11.6)# Server version: CockroachDB CCL v19.1.0 (x86_64-unknown-linux-gnu, built 2019/04/29 18:36:40, go1.11.6)# Cluster ID: 256a8705-e348-4e3a-ab12-e1aba96857e4## Enter \? for a brief introduction.#root@my-release-cockroachdb-public:26257/defaultdb>
This pod will continue running indefinitely, so any time you need to reopen the built-in SQL client or run any other cockroach client commands (e.g., cockroach node), repeat step 2 using the appropriate cockroach command.If you’d prefer to delete the pod and recreate it when needed, run kubectl delete pod cockroachdb-client-secure.
On secure clusters, certain pages of the DB Console can only be accessed by admin users.Get a shell into the pod and start the CockroachDB built-in SQL client:$ kubectl exec -it cockroachdb-client-secure \ —./cockroach sql \ —certs-dir=/cockroach-certs \ —host=my-release-cockroachdb-public
Assign roach to the admin role (you only need to do this once):
> GRANT admin TO roach;
Exit the SQL shell and pod:
> \q
In a new terminal window, port-forward from your local machine to the cockroachdb-public service:
The port-forward command must be run on the same machine as the web browser in which you want to view the DB Console. If you have been running these commands from a cloud instance or other non-local shell, you will not be able to view the UI without configuring kubectl locally and running the above port-forward command on your local machine.
Go to https://localhost:8080 and log in with the username and password you created earlier.If you are using Google Chrome, and you are getting an error about not being able to reach localhost because its certificate has been revoked, go to chrome://flags/#allow-insecure-localhost, enable “Allow invalid certificates for resources loaded from localhost”, and then restart the browser. Enabling this Chrome feature degrades security for all sites running on localhost, not just CockroachDB’s DB Console, so be sure to enable the feature only temporarily.
In the UI, verify that the cluster is running as expected:
View the Node List to ensure that all nodes successfully joined the cluster.
Click the Databases tab on the left to verify that bank is listed.
Update secretName with the name of the corresponding node secret.The secret names depend on your method for generating secrets. For example, if you follow the below steps using cockroach cert, use this secret name:
secret: secretName: cockroachdb.node
The StatefulSet configuration deploys CockroachDB into the default namespace. To use a different namespace, search for kind: RoleBinding and change its subjects.namespace property to the name of the namespace. Otherwise, a failed to read secrets error occurs when you attempt to follow the steps in Initialize the cluster.
By default, this manifest specifies CPU and memory resources that are appropriate for the virtual machines used in this deployment example. On a production cluster, you should substitute values that are appropriate for your machines and workload. For details on configuring your deployment, see Configure the Cluster.
The StatefulSet configuration sets all CockroachDB nodes to log to stderr, so if you ever need access to a pod/node’s logs to troubleshoot, use kubectl logs <podname> rather than checking the log on the persistent volume.The below steps use cockroach cert commands to quickly generate and sign the CockroachDB node and client certificates. Read our Authentication docs to learn about other methods of signing certificates.
Create two directories:
$ mkdir certs my-safe-directory
Directory
Description
certs
You’ll generate your CA certificate and all node and client certificates and keys in this directory.
my-safe-directory
You’ll generate your CA key in this directory and then reference the key when generating node and client certificates.
Confirm that cluster initialization has completed successfully. The job should be considered successful and the Kubernetes pods should soon be considered Ready:
$ kubectl get pods
NAME READY STATUS RESTARTS AGEcockroachdb-0 1/1 Running 0 3mcockroachdb-1 1/1 Running 0 3mcockroachdb-2 1/1 Running 0 3m
# Welcome to the cockroach SQL interface.# All statements must be terminated by a semicolon.# To exit: CTRL + D.## Client version: CockroachDB CCL v19.1.0 (x86_64-unknown-linux-gnu, built 2019/04/29 18:36:40, go1.11.6)# Server version: CockroachDB CCL v19.1.0 (x86_64-unknown-linux-gnu, built 2019/04/29 18:36:40, go1.11.6)# Cluster ID: 256a8705-e348-4e3a-ab12-e1aba96857e4## Enter \? for a brief introduction.#root@cockroachdb-public:26257/defaultdb>
This pod will continue running indefinitely, so any time you need to reopen the built-in SQL client or run any other cockroach client commands (e.g., cockroach node), repeat step 2 using the appropriate cockroach command.If you’d prefer to delete the pod and recreate it when needed, run kubectl delete pod cockroachdb-client-secure.
The port-forward command must be run on the same machine as the web browser in which you want to view the DB Console. If you have been running these commands from a cloud instance or other non-local shell, you will not be able to view the UI without configuring kubectl locally and running the above port-forward command on your local machine.
Go to https://localhost:8080 and log in with the username and password you created earlier.If you are using Google Chrome, and you are getting an error about not being able to reach localhost because its certificate has been revoked, go to chrome://flags/#allow-insecure-localhost, enable “Allow invalid certificates for resources loaded from localhost”, and then restart the browser. Enabling this Chrome feature degrades security for all sites running on localhost, not just CockroachDB’s DB Console, so be sure to enable the feature only temporarily.
In the UI, verify that the cluster is running as expected:
View the Node List to ensure that all nodes successfully joined the cluster.
Click the Databases tab on the left to verify that bank is listed.
If you plan to restart the cluster, use the minikube stop command. This shuts down the minikube virtual machine but preserves all the resources you created:
minikube stop
Stopping local Kubernetes cluster...Machine stopped.
You can restore the cluster to its previous state with minikube start.
If you do not plan to restart the cluster, use the minikube delete command. This shuts down and deletes the minikube virtual machine and all the resources you created, including persistent volumes:
minikube delete
Deleting local Kubernetes cluster...Machine deleted.
To retain logs, copy them from each pod’s stderr before deleting the cluster and all its resources. To access a pod’s standard error stream, run kubectl logs <podname>.
{"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":""},"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":"6af5fb766d281f8985c1977e","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"CockroachDB","count":6951},{"language":"default","tag":"Docs","count":3217},{"language":"default","tag":"SQL","count":2566},{"language":"default","tag":"Statements","count":1714},{"language":"default","tag":"Self-Hosted Deployments","count":1457},{"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":true,"showContentSnippets":true,"fullPageSearch":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","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}],"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-metrics-table table{table-layout:fixed!important;width:100%!important;min-width:0!important;max-width:100%!important;border-collapse:collapse}.crdb-metrics-table table td,.crdb-metrics-table table th{min-width:0!important;overflow-wrap:anywhere;word-break:break-word}.crdb-fixed-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{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:0.5rem;margin-bottom:2rem!important;padding:2rem}.card{border:1px solid #e5e7eb;border-radius:0.75rem;background-color:white}.dark .card{background-color:#0d1117;border-color:rgba(255, 255, 255, 0.1)}.card-link{text-decoration:none!important;overflow:hidden}.card-link:hover{outline:1px solid rgba(105, 51, 255, 0.55);outline-offset:-1px}.card-link,.card-link:hover{transform:none!important;box-shadow:none!important}.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}.overline{text-transform:uppercase;letter-spacing:0.05em}.btn-redirect{display:inline-flex;align-items:center;gap:0.5rem;padding:0.75rem 1.5rem;border:2px solid #e5e7eb;border-radius:0.5rem;text-decoration:none;transition:border-color 0.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, 0.1)}.article-section-title{font-size:1.25rem!important}.article-lists h3{font-size:0.875rem!important;font-weight:600!important;text-transform:uppercase;letter-spacing:0.05em;color:#6b7280!important}.dark .article-lists h3{color:#9ca3af!important}.article-lists ul{font-size:0.875rem}.shadow{box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15)}.bg-dark-wing{background-color:#152849;border-radius:0.5rem}.text-ice-temple{color:#1bf8ec!important;display:inline-flex;align-items:center;gap:0.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:0.9375rem!important;font-weight:400!important;line-height:1.5!important;text-align:left!important;color:#4b5563!important;width:100%;margin-top:0.5rem}.dark .card-link .card-desc{color:#9ca3af!important}.report-tag{display:inline-block;padding:0.25rem 0.75rem;border-radius:0.25rem;background-color:rgba(84, 42, 189, 0.08);color:#542abd}.dark .report-tag{background-color:rgba(84, 42, 189, 0.3);color:#b39dff}.resilience-report-img{background-image:url(\"/images/state-resilience.png\");background-size:cover;background-position:center;min-height:150px;border-radius:0.5rem}.row{display:flex!important;flex-wrap:wrap;margin-left:-0.75rem;margin-right:-0.75rem}.display-flex{display:flex!important}.col-lg-4{flex:0 0 auto;width:100%;padding-left:0.75rem;padding-right:0.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:0.75rem;padding-right:0.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:0.75rem;padding-right:0.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:0.75rem;padding-right:0.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:0.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:0.5rem!important}.mb-0{margin-bottom:0!important}.mb-2{margin-bottom:0.5rem!important}.mb-4{margin-bottom:1.5rem!important}.p-2{padding:0.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:0.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}.text-white{color:white!important}.text-black{color:black!important}.dark .text-black{color:white!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 th,.prose table td{border:1px solid rgb(var(--gray-200))!important}.dark .prose table th,.dark .prose table td{border-color:rgb(var(--gray-700) / 0.5)!important}.prose table th{padding:0.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:0.571429em;vertical-align:baseline}[data-component-part=\"accordion-description\"]{font-size:0.875rem!important}.accordion.mb-3{margin-bottom:0.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:bold}.sql-grammar svg text.nonterminal{font-family:Verdana, Sans-serif;font-size:12px;fill:#0055FF}.sql-grammar svg text.regexp{font-family:Verdana, Sans-serif;font-size:12px;fill:#0F0F0F}.sql-grammar svg rect,.sql-grammar svg circle,.sql-grammar svg polygon{fill:#262626;stroke:#262626}.sql-grammar svg rect.terminal{fill:#ffffff;stroke:#262626}.sql-grammar svg rect.nonterminal{fill:#FFFFFF;stroke:#262626}.sql-grammar svg rect.text{fill:none;stroke:none}.sql-grammar svg polygon.regexp{fill:#FFFFFF;stroke:#262626}.sql-grammar svg{background-color:#ffffff}.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}"},{"filePath":"collapse-nav.css","content":"html:not(.crl-nav-off) [data-layout-item=\"sidebar\"] li[data-title]:not([data-active]):not([data-crl-keep])>button+ul,html:not(.crl-nav-off) [data-layout-item=\"mobile-nav\"] li[data-title]:not([data-active]):not([data-crl-keep])>button+ul{display:none}html:not(.crl-nav-off) [data-layout-item=\"sidebar\"] li[data-title]:not([data-active]):not([data-crl-keep])>button svg,html:not(.crl-nav-off) [data-layout-item=\"mobile-nav\"] li[data-title]:not([data-active]):not([data-crl-keep])>button svg{rotate:none!important;transform:none!important}"}],"page":{"pagePath":"docs/v24.1/orchestrate-a-local-cluster-with-kubernetes","slug":"/docs/v24.1/orchestrate-a-local-cluster-with-kubernetes","pageMetadata":{"title":"Deploy a Local Cluster in Kubernetes","old_description":"Deploy a local 3-node CockroachDB cluster with Kubernetes.","canonical":"https://docs.cockroachlabs.com/docs/stable/cockroachdb-operator-overview","description":null,"href":"/docs/v24.1/orchestrate-a-local-cluster-with-kubernetes"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Danger,Heading,Note,Tab,Table,Tabs,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Danger)_missingMdxReference(`Danger`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`On top of CockroachDB’s built-in automation, you can use a third-party `,_jsx(_components.a,{href:`/docs/v24.1/kubernetes-overview`,children:`orchestration`}),` system to simplify and automate even more of your operations, from deployment to scaling to overall cluster management.`]}),`\n`,_jsxs(_components.p,{children:[`This page demonstrates a basic integration with the open-source `,_jsx(_components.a,{href:`http://kubernetes.io/`,children:`Kubernetes`}),` orchestration system. Using either the CockroachDB `,_jsx(_components.a,{href:`https://helm.sh/`,children:`Helm`}),` chart or a few configuration files, you’ll quickly create a 3-node local cluster. You’ll run some SQL commands against the cluster and then simulate node failure, watching how Kubernetes auto-restarts without the need for any manual intervention. You’ll then scale the cluster with a single command before shutting the cluster down, again with a single command.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`To orchestrate a physically distributed cluster in production, see `,_jsx(_components.a,{href:`/docs/v24.1/kubernetes-overview`,children:`Orchestrated Deployments`}),`. To deploy a 30-day free CockroachDB Dedicated cluster instead of running CockroachDB yourself, see the `,_jsx(_components.a,{href:`/docs/cockroachcloud/quickstart`,children:`Quickstart`}),`.`]})}),`\n`,_jsx(`a`,{id:`best-practices`}),`\n`,_jsx(Heading,{level:`2`,id:`limitations`,children:`Limitations`}),`\n`,_jsx(Heading,{level:`4`,id:`kubernetes-version`,children:`Kubernetes version`}),`\n`,_jsxs(_components.p,{children:[`To deploy CockroachDB v24.1, Kubernetes 1.18 or higher is required. Cockroach Labs strongly recommends that you use a Kubernetes version that is `,_jsx(_components.a,{href:`https://kubernetes.io/releases`,children:`eligible for patch support by the Kubernetes project`}),`.`]}),`\n`,_jsx(Heading,{level:`4`,id:`kubernetes-operator`,children:`Kubernetes Operator`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The CockroachDB Kubernetes Operator currently deploys clusters in a single region. For multi-region deployments using manual configs, see `,_jsx(_components.a,{href:`/docs/v24.1/orchestrate-cockroachdb-with-kubernetes-multi-cluster`,children:`Orchestrate CockroachDB Across Multiple Kubernetes Clusters`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Using the Operator, you can give a new cluster an arbitrary number of `,_jsx(_components.a,{href:`https://kubernetes.io/docs/concepts/overview/working-with-objects/labels`,children:`labels`}),`. However, a cluster’s labels cannot be modified after it is deployed. To track the status of this limitation, refer to `,_jsx(_components.a,{href:`https://github.com/cockroachdb/cockroach-operator/issues/993`,children:`#993`}),` in the Operator project’s issue tracker.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`helm-version`,children:`Helm version`}),`\n`,_jsx(_components.p,{children:`The CockroachDB Helm chart requires Helm 3.0 or higher. If you attempt to use an incompatible Helm version, an error like the following occurs:`}),`\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:`Error:`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` UPGRADE`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` FAILED:`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` template:`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb/templates/tests/client.yaml:6:14:`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` executing`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` \"cockroachdb/templates/tests/client.yaml\"`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` at`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`.Values.networkPolicy.enable`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`d`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`>`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`:`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` nil`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` pointer`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` evaluating`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` interface`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` {}.enabled`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The CockroachDB Helm chart is currently not under active development, and no new features are planned. However, Cockroach Labs remains committed to fully supporting the Helm chart by addressing defects, providing security patches, and addressing breaking changes due to deprecations in Kubernetes APIs.`}),`\n`,_jsx(_components.p,{children:`A deprecation notice for the Helm chart will be provided to customers a minimum of 6 months in advance of actual deprecation.`}),`\n`,_jsx(Heading,{level:`4`,id:`network`,children:`Network`}),`\n`,_jsx(_components.p,{children:`Service Name Indication (SNI) is an extension to the TLS protocol which allows a client to indicate which hostname it is attempting to connect to at the start of the TCP handshake process. The server can present multiple certificates on the same IP address and TCP port number, and one server can serve multiple secure websites or API services even if they use different certificates.`}),`\n`,_jsx(_components.p,{children:`Due to its order of operations, the PostgreSQL wire protocol’s implementation of TLS is not compatible with SNI-based routing in the Kubernetes ingress controller. Instead, use a TCP load balancer for CockroachDB that is not shared with other services.`}),`\n`,_jsx(Heading,{level:`4`,id:`resources`,children:`Resources`}),`\n`,_jsxs(_components.p,{children:[`When starting Kubernetes, select machines with at least `,_jsx(_components.strong,{children:`4 vCPUs`}),` and `,_jsx(_components.strong,{children:`16 GiB`}),` of memory, and provision at least `,_jsx(_components.strong,{children:`2 vCPUs`}),` and `,_jsx(_components.strong,{children:`8 Gi`}),` of memory to CockroachDB per pod. These minimum settings are used by default in this deployment guide, and are appropriate for testing purposes only. On a production deployment, you should adjust the resource settings for your workload. For details, see `,_jsx(_components.a,{href:`/docs/v24.1/configure-cockroachdb-kubernetes#memory-and-cpu`,children:`Resource management`}),`.`]}),`\n`,_jsx(`a`,{id:`storage`}),`\n`,_jsx(Heading,{level:`4`,id:`storage`,children:`Storage`}),`\n`,_jsxs(_components.p,{children:[`Kubernetes deployments use external persistent volumes that are often replicated by the provider. CockroachDB replicates data automatically, and this redundant layer of replication can impact performance. Using `,_jsx(_components.a,{href:`https://kubernetes.io/docs/concepts/storage/volumes#local`,children:`local volumes`}),` may improve performance.`]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-begin`,children:`Before you begin`}),`\n`,_jsx(_components.p,{children:`Before getting started, it’s helpful to review some Kubernetes-specific terminology:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Feature`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`http://kubernetes.io/docs/getting-started-guides/minikube`,children:`minikube`})}),_jsx(_components.td,{children:`A tool commonly used to run a Kubernetes cluster on a local workstation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`http://kubernetes.io/docs/user-guide/pods`,children:`pod`})}),_jsx(_components.td,{children:`A pod is a group of one of more containers managed by Kubernetes. In this tutorial, all pods run on your local workstation. Each pod contains a single container that runs a single-node CockroachDB cluster. You’ll start with 3 pods and grow to 4.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`http://kubernetes.io/docs/concepts/abstractions/controllers/statefulsets`,children:`StatefulSet`})}),_jsx(_components.td,{children:`A StatefulSet is a group of pods treated as stateful units, where each pod has distinguishable network identity and always binds back to the same persistent storage on restart.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`http://kubernetes.io/docs/user-guide/persistent-volumes`,children:`persistent volume`})}),_jsxs(_components.td,{children:[`A persistent volume is storage mounted in a pod and available to its containers. The lifetime of a persistent volume is decoupled from the lifetime of the pod that’s using it, ensuring that each CockroachDB node binds back to the same storage on restart. When using `,_jsx(_components.code,{children:`minikube`}),`, persistent volumes are external temporary directories that endure until they are manually deleted or until the entire Kubernetes cluster is deleted.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims`,children:`persistent volume claim`})}),_jsx(_components.td,{children:`When e pod is created, it requests a persistent volume claim to claim durable storage for its node.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-start-kubernetes`,children:`Step 1. Start Kubernetes`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Follow the `,_jsx(_components.a,{href:`https://kubernetes.io/docs/tasks/tools/install-minikube`,children:`Minikube documentation`}),` to install the latest version of `,_jsx(_components.code,{children:`minikube`}),`, a hypervisor, and the `,_jsx(_components.code,{children:`kubectl`}),` command-line tool.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Start a local Kubernetes 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:`minikube`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` start`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-start-cockroachdb`,children:`Step 2. Start CockroachDB`}),`\n`,_jsx(_components.p,{children:`Choose a way to deploy and maintain the CockroachDB cluster:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://github.com/cockroachdb/cockroach-operator`,children:`CockroachDB Kubernetes Operator`}),` (recommended)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://helm.sh/`,children:`Helm`}),` package manager`]}),`\n`,_jsx(_components.li,{children:`Manually apply our StatefulSet configuration and related files`}),`\n`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Public operator`,id:`public-operator`,\"data-child-heading-ids\":`[\"install-the-operator\",\"initialize-the-cluster\",\"step-3-use-the-built-in-sql-client\",\"step-4-access-the-db-console\"]`,children:[_jsx(Heading,{level:`3`,id:`install-the-operator`,children:`Install the Operator`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Apply the `,_jsx(_components.a,{href:`https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources#customresourcedefinitions`,children:`custom resource definition (CRD)`}),` for the Operator:`]}),`\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:` https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.18.3/install/crds.yaml`})]}),`\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:`customresourcedefinition.apiextensions.k8s.io/crdbclusters.crdb.cockroachlabs.com created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`By default, the Operator is configured to install in the `,_jsx(_components.code,{children:`cockroach-operator-system`}),` namespace and to manage CockroachDB instances for all namespaces on the cluster.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`To use these defaults, apply the Operator manifest without modifying it:`}),`\n`]}),`\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:`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:` https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.18.3/install/operator.yaml`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`clusterrole.rbac.authorization.k8s.io/cockroach-database-role created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`serviceaccount/cockroach-database-sa created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`clusterrolebinding.rbac.authorization.k8s.io/cockroach-database-rolebinding created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`role.rbac.authorization.k8s.io/cockroach-operator-role created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`clusterrolebinding.rbac.authorization.k8s.io/cockroach-operator-rolebinding created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`clusterrole.rbac.authorization.k8s.io/cockroach-operator-role created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`serviceaccount/cockroach-operator-sa created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`rolebinding.rbac.authorization.k8s.io/cockroach-operator-default created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`deployment.apps/cockroach-operator created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`To change these defaults:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Download the Operator manifest:`}),`\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:`curl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -O`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.18.3/install/operator.yaml`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`To use a custom namespace, edit all instances of `,_jsx(_components.code,{children:`namespace: cockroach-operator-system`}),` with your desired namespace.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`To limit the namespaces that will be monitored, set the `,_jsx(_components.code,{children:`WATCH_NAMESPACE`}),` environment variable in the `,_jsx(_components.code,{children:`Deployment`}),` pod spec. This can be set to a single namespace or a comma-delimited set of namespaces. When set, only those `,_jsx(_components.code,{children:`CrdbCluster`}),` resources in the supplied namespace(s) will be reconciled.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Apply your local version of the Operator manifest 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:`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:` operator.yaml`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Set your current namespace to the one used by the Operator. For example, to use the Operator’s default namespace:`}),`\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:` config`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` set-context`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` --current`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` --namespace=cockroach-operator-system`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Validate that the Operator is running:`}),`\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:`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:`NAME READY STATUS RESTARTS AGE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroach-operator-6f7b86ffc4-9ppkv 1/1 Running 0 54s`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`initialize-the-cluster`,children:`Initialize the cluster`}),_jsx(Note,{children:_jsxs(_components.p,{children:[`After a cluster managed by the Kubernetes operator is initialized, its Kubernetes labels cannot be modified. For more details, refer to `,_jsx(_components.a,{href:`#best-practices`,children:`Best practices`}),`.`]})}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Download `,_jsx(_components.code,{children:`example.yaml`}),`, a custom resource that tells the Operator how to configure the Kubernetes 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:` curl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -O`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.18.3/examples/example.yaml`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`By default, this custom resource specifies CPU and memory resources that are appropriate for the virtual machines used in this deployment example. On a production cluster, you should substitute values that are appropriate for your machines and workload. For details on configuring your deployment, see `,_jsx(_components.a,{href:`/docs/v24.1/configure-cockroachdb-kubernetes`,children:`Configure the Cluster`}),`.`]}),`\n`]}),`\n`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`By default, the Operator will generate and sign 1 client and 1 node certificate to secure the cluster. This means that if you do not provide a CA, a `,_jsx(_components.code,{children:`cockroach`}),`-generated CA is used. If you want to authenticate using your own CA, `,_jsx(_components.a,{href:`/docs/v24.1/secure-cockroachdb-kubernetes#use-a-custom-ca`,children:`specify the generated secrets in the custom resource`}),` `,_jsx(_components.strong,{children:`before`}),` proceeding to the next step.`]})}),_jsxs(_components.ol,{start:`2`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Apply `,_jsx(_components.code,{children:`example.yaml`}),`:`]}),`\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 create a StatefulSet and initialize the nodes as a cluster.`}),`\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:`crdbcluster.crdb.cockroachlabs.com/cockroachdb created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Check that the pods were created:`}),`\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:`cockroach-operator-6f7b86ffc4-9t9zb 1/1 Running 0 3m22s`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-0 1/1 Running 0 2m31s`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-1 1/1 Running 0 102s`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-2 1/1 Running 0 46s`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Each pod should have `,_jsx(_components.code,{children:`READY`}),` status soon after being created.`]}),`\n`]}),`\n`]}),_jsx(Heading,{level:`2`,id:`step-3-use-the-built-in-sql-client`,children:`Step 3. Use the built-in SQL client`}),_jsxs(_components.p,{children:[`To use the CockroachDB SQL client, first launch a secure pod running the `,_jsx(_components.code,{children:`cockroach`}),` binary.`]}),_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:` create`}),_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:`-f `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.18.3/examples/client-secure-operator.yaml`})]}),`\n`]})})}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Get a shell into the pod and start the CockroachDB `,_jsx(_components.a,{href:`/docs/v24.1/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/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`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,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:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Welcome to the CockroachDB SQL shell.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# All statements must be terminated by a semicolon.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# To exit, type: \\\\q.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Server version: CockroachDB CCL v21.1.0 (x86_64-unknown-linux-gnu, built 2021/04/23 13:54:57, go1.13.14) (same version as client)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Cluster ID: a96791d9-998c-4683-a3d3-edbf425bbf11`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Enter \\\\? for a brief introduction.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`root@cockroachdb-public:26257/defaultdb>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Run some basic `,_jsx(_components.a,{href:`/docs/v24.1/learn-cockroachdb-sql`,children:`CockroachDB SQL statements`}),`:`]}),`\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:` CREATE`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` DATABASE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank;`})]}),`\n`]})})}),`\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:` CREATE`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TABLE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank.accounts (id `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`INT`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` PRIMARY KEY`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`, balance `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`DECIMAL`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`);`})]}),`\n`]})})}),`\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:` INSERT INTO`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank.accounts `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`VALUES`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`1`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`, `}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`1000`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`.`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`50`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`);`})]}),`\n`]})})}),`\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:` SELECT`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:` *`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` FROM`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank.accounts;`})]}),`\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:` id | balance`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`+----+---------+`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` 1 | 1000.50`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`(1 row)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/docs/v24.1/create-user#create-a-user-with-a-password`,children:`Create a user with a password`}),`:`]}),`\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:` CREATE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` USER roach `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`WITH`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` PASSWORD`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` 'Q7gc8rEdS'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`You will need this username and password to access the DB Console later.`}),`\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(Heading,{level:`2`,id:`step-4-access-the-db-console`,children:`Step 4. Access the DB Console`}),_jsxs(_components.p,{children:[`To access the cluster’s `,_jsx(_components.a,{href:`/docs/v24.1/ui-overview`,children:`DB Console`}),`:`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`On secure clusters, `,_jsx(_components.a,{href:`/docs/v24.1/ui-overview#db-console-access`,children:`certain pages of the DB Console`}),` can only be accessed by `,_jsx(_components.code,{children:`admin`}),` users.`]}),`\n`,_jsxs(_components.p,{children:[`Get a shell into the pod and start the CockroachDB `,_jsx(_components.a,{href:`/docs/v24.1/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/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:[`Assign `,_jsx(_components.code,{children:`roach`}),` to the `,_jsx(_components.code,{children:`admin`}),` role (you only need to do this once):`]}),`\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:` GRANT`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` admin`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TO`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` roach;`})]}),`\n`]})})}),`\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`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`In a new terminal window, port-forward from your local machine to the `,_jsx(_components.code,{children:`cockroachdb-public`}),` service:`]}),`\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:` port-forward`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` service/cockroachdb-public`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:` 8080`})]}),`\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:`Forwarding from 127.0.0.1:8080 -> 8080`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`port-forward`}),` command must be run on the same machine as the web browser in which you want to view the DB Console. If you have been running these commands from a cloud instance or other non-local shell, you will not be able to view the UI without configuring `,_jsx(_components.code,{children:`kubectl`}),` locally and running the above `,_jsx(_components.code,{children:`port-forward`}),` command on your local machine.`]})}),_jsxs(_components.ol,{start:`5`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Go to `,_jsx(_components.a,{href:`https://localhost:8080/`,children:`https://localhost:8080`}),` and log in with the username and password you created earlier.`]}),`\n`,_jsxs(_components.p,{children:[`If you are using Google Chrome, and you are getting an error about not being able to reach `,_jsx(_components.code,{children:`localhost`}),` because its certificate has been revoked, go to `,_jsx(_components.a,{href:`chrome://flags/#allow-insecure-localhost`,children:`chrome://flags/#allow-insecure-localhost`}),`, enable “Allow invalid certificates for resources loaded from localhost”, and then restart the browser. Enabling this Chrome feature degrades security for all sites running on `,_jsx(_components.code,{children:`localhost`}),`, not just CockroachDB’s DB Console, so be sure to enable the feature only temporarily.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`In the UI, verify that the cluster is running as expected:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`View the `,_jsx(_components.a,{href:`/docs/v24.1/ui-cluster-overview-page#node-list`,children:`Node List`}),` to ensure that all nodes successfully joined the cluster.`]}),`\n`,_jsxs(_components.li,{children:[`Click the `,_jsx(_components.strong,{children:`Databases`}),` tab on the left to verify that `,_jsx(_components.code,{children:`bank`}),` is listed.`]}),`\n`]}),`\n`]}),`\n`]})]}),_jsxs(Tab,{title:`Helm`,id:`helm`,\"data-child-heading-ids\":`[\"step-3-use-the-built-in-sql-client-2\",\"step-4-access-the-db-console-2\"]`,children:[_jsxs(_components.p,{children:[`The CockroachDB Helm chart is compatible with all Kubernetes versions that are `,_jsx(_components.a,{href:`https://kubernetes.io/releases`,children:`supported by the Kubernetes project`}),` when cert-manager is used for mTLS.`]}),_jsx(_components.p,{children:`The CockroachDB Helm chart is currently not under active development, and no new features are planned. However, Cockroach Labs remains committed to fully supporting the Helm chart by addressing defects, providing security patches, and addressing breaking changes due to deprecations in Kubernetes APIs.`}),_jsx(_components.p,{children:`A deprecation notice for the Helm chart will be provided to customers a minimum of 6 months in advance of actual deprecation.`}),_jsx(Danger,{children:_jsxs(_components.p,{children:[`If you are running a secure Helm deployment on Kubernetes 1.22 and later, you must migrate away from using the Kubernetes CA for cluster authentication. The recommended approach is to use `,_jsx(_components.code,{children:`cert-manager`}),` for certificate management. For details, refer to `,_jsx(_components.a,{href:`/docs/v24.1/secure-cockroachdb-kubernetes?filters=helm#deploy-cert-manager-for-mtls`,children:`Deploy cert-manager for mTLS`}),`.`]})}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://helm.sh/docs/intro/install`,children:`Install the Helm client`}),` (version 3.0 or higher) and add the `,_jsx(_components.code,{children:`cockroachdb`}),` chart repository:`]}),`\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:` helm`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` repo`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` add`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` https://charts.cockroachdb.com/`})]}),`\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:`\"cockroachdb\" has been added to your repositories`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Update your Helm chart repositories to ensure that you’re using the `,_jsx(_components.a,{href:`https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/Chart.yaml`,children:`latest CockroachDB chart`}),`:`]}),`\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:` helm`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` repo`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` update`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`The cluster configuration is set in the Helm chart’s `,_jsx(_components.a,{href:`https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml`,children:`values file`}),`.`]}),`\n`]}),`\n`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`By default, the Helm chart specifies CPU and memory resources that are appropriate for the virtual machines used in this deployment example. On a production cluster, you should substitute values that are appropriate for your machines and workload. For details on configuring your deployment, see `,_jsx(_components.a,{href:`/docs/v24.1/configure-cockroachdb-kubernetes?filters=helm`,children:`Configure the Cluster`}),`.`]})}),_jsxs(_components.p,{children:[`Before deploying, modify some parameters in our Helm chart’s `,_jsx(_components.a,{href:`https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml`,children:`values file`}),`:`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Create a local YAML file (e.g., `,_jsx(_components.code,{children:`my-values.yaml`}),` ) to specify your custom values. These will be used to override the defaults in `,_jsx(_components.code,{children:`values.yaml`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`To avoid running out of memory when CockroachDB is not the only pod on a Kubernetes node, you `,_jsx(_components.em,{children:`must`}),` set memory limits explicitly. This is because CockroachDB does not detect the amount of memory allocated to its pod when run in Kubernetes. We recommend setting `,_jsx(_components.code,{children:`conf.cache`}),` and `,_jsx(_components.code,{children:`conf.max-sql-memory`}),` each to 1/4 of the `,_jsx(_components.code,{children:`memory`}),` allocation specified in `,_jsx(_components.code,{children:`statefulset.resources.requests`}),` and `,_jsx(_components.code,{children:`statefulset.resources.limits`}),`.`]}),`\n`]}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`For example, if you are allocating 8Gi of `,_jsx(_components.code,{children:`memory`}),` to each CockroachDB node, allocate 2Gi to `,_jsx(_components.code,{children:`cache`}),` and 2Gi to `,_jsx(_components.code,{children:`max-sql-memory`}),`.`]})}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-dark\":`#89B4FA`},children:`conf`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-dark\":`#89B4FA`},children:` cache`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`:`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` \"2Gi\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-dark\":`#89B4FA`},children:` max-sql-memory`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`:`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` \"2Gi\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The Helm chart defaults to a secure deployment by automatically setting `,_jsx(_components.code,{children:`tls.enabled`}),` to `,_jsx(_components.code,{children:`true`}),`.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`By default, the Helm chart will generate and sign 1 client and 1 node certificate to secure the cluster. To authenticate using your own CA, see `,_jsx(_components.a,{href:`/docs/v24.1/secure-cockroachdb-kubernetes?filters=helm#use-a-custom-ca`,children:`Certificate management`}),`.`]})}),_jsxs(_components.p,{children:[`Refer to the `,_jsxs(_components.a,{href:`https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml`,children:[`CockroachDB Helm chart’s `,_jsx(_components.code,{children:`values.yaml`}),` template`]}),`.`]}),_jsxs(_components.ol,{start:`4`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Install the CockroachDB Helm chart, specifying your custom values file.`}),`\n`,_jsxs(_components.p,{children:[`Provide a “release” name to identify and track this particular deployment of the chart, and override the default values with those in `,_jsx(_components.code,{children:`my-values.yaml`}),`.`]}),`\n`]}),`\n`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`This tutorial uses `,_jsx(_components.code,{children:`my-release`}),` as the release name. If you use a different value, be sure to adjust the release name in subsequent commands.`]})}),_jsx(Danger,{children:_jsxs(_components.p,{children:[`To allow the CockroachDB pods to successfully deploy, do not set the `,_jsxs(_components.a,{href:`https://helm.sh/docs/intro/using_helm#helpful-options-for-installupgraderollback`,children:[_jsx(_components.code,{children:`--wait`}),` flag`]}),` when using Helm commands.`]})}),_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:` helm`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` install`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` my-release`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` --values`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` {custom-values}.yaml`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb/cockroachdb`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Behind the scenes, this command uses our `,_jsx(_components.code,{children:`cockroachdb-statefulset.yaml`}),` file to create the StatefulSet that automatically creates 3 pods, each with a CockroachDB node running inside it, where each pod has distinguishable network identity and always binds back to the same persistent storage on restart.`]}),_jsxs(_components.ol,{start:`5`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Confirm that CockroachDB cluster initialization has completed successfully, with the pods for CockroachDB showing `,_jsx(_components.code,{children:`1/1`}),` under `,_jsx(_components.code,{children:`READY`}),` and the pod for initialization showing `,_jsx(_components.code,{children:`COMPLETED`}),` under `,_jsx(_components.code,{children:`STATUS`}),`:`]}),`\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:`my-release-cockroachdb-0 1/1 Running 0 8m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-1 1/1 Running 0 8m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-2 1/1 Running 0 8m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-release-cockroachdb-init-hxzsc 0/1 Completed 0 1h`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Confirm that the persistent volumes and corresponding claims were created successfully for all three pods:`}),`\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:` pv`})]}),`\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:`NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`pvc-71019b3a-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-0 standard 11m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`pvc-7108e172-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-1 standard 11m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`pvc-710dcb66-fc67-11e8-a606-080027ba45e5 100Gi RWO Delete Bound default/datadir-my-release-cockroachdb-2 standard 11m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`]}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`The StatefulSet configuration sets all CockroachDB nodes to log to `,_jsx(_components.code,{children:`stderr`}),`, so if you ever need access to logs for a pod, use `,_jsx(_components.code,{children:`kubectl logs \u003cpodname>`}),` rather than checking the log on the persistent volume.`]})}),_jsx(Heading,{level:`2`,id:`step-3-use-the-built-in-sql-client-2`,children:`Step 3. Use the built-in SQL client`}),_jsxs(_components.p,{children:[`To use the CockroachDB SQL client, first launch a secure pod running the `,_jsx(_components.code,{children:`cockroach`}),` binary.`]}),_jsxs(_components.p,{children:[`From your local workstation, use our `,_jsx(_components.a,{href:`https://github.com/cockroachdb/helm-charts/blob/master/examples/client-secure.yaml`,children:_jsx(_components.code,{children:`client-secure.yaml`})}),` file to launch a pod and keep it running indefinitely.`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Download the file:`}),`\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:` curl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -OOOOOOOOO`}),_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:`https://raw.githubusercontent.com/cockroachdb/helm-charts/master/examples/client-secure.yaml`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`In the file, set the following values:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`spec.serviceAccountName: my-release-cockroachdb`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`spec.image: cockroachdb/cockroach: {your CockroachDB version}`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`spec.volumes[0].project.sources[0].secret.name: my-release-cockroachdb-client-secret`})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Use the file to launch a pod and keep it running indefinitely:`}),`\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:` create`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -f`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` client-secure.yaml`})]}),`\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:`pod \"cockroachdb-client-secure\" created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Get a shell into the pod and start the CockroachDB `,_jsx(_components.a,{href:`/docs/v24.1/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`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,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:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Welcome to the cockroach SQL interface.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# All statements must be terminated by a semicolon.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# To exit: CTRL + D.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Client version: CockroachDB CCL v19.1.0 (x86_64-unknown-linux-gnu, built 2019/04/29 18:36:40, go1.11.6)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Server version: CockroachDB CCL v19.1.0 (x86_64-unknown-linux-gnu, built 2019/04/29 18:36:40, go1.11.6)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Cluster ID: 256a8705-e348-4e3a-ab12-e1aba96857e4`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Enter \\\\? for a brief introduction.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`root@my-release-cockroachdb-public:26257/defaultdb>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`]}),_jsxs(Tip,{children:[_jsxs(_components.p,{children:[`This pod will continue running indefinitely, so any time you need to reopen the built-in SQL client or run any other `,_jsxs(_components.a,{href:`/docs/v24.1/cockroach-commands`,children:[_jsx(_components.code,{children:`cockroach`}),` client commands`]}),` (e.g., `,_jsx(_components.code,{children:`cockroach node`}),`), repeat step 2 using the appropriate `,_jsx(_components.code,{children:`cockroach`}),` command.`]}),_jsxs(_components.p,{children:[`If you’d prefer to delete the pod and recreate it when needed, run `,_jsx(_components.code,{children:`kubectl delete pod cockroachdb-client-secure`}),`.`]})]}),_jsxs(_components.ol,{start:`5`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Run some basic `,_jsx(_components.a,{href:`/docs/v24.1/learn-cockroachdb-sql`,children:`CockroachDB SQL statements`}),`:`]}),`\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:` CREATE`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` DATABASE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank;`})]}),`\n`]})})}),`\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:` CREATE`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TABLE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank.accounts (id `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`INT`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` PRIMARY KEY`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`, balance `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`DECIMAL`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`);`})]}),`\n`]})})}),`\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:` INSERT INTO`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank.accounts `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`VALUES`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`1`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`, `}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`1000`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`.`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`50`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`);`})]}),`\n`]})})}),`\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:` SELECT`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:` *`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` FROM`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank.accounts;`})]}),`\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:` id | balance`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`+----+---------+`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` 1 | 1000.50`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`(1 row)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/docs/v24.1/create-user#create-a-user-with-a-password`,children:`Create a user with a password`}),`:`]}),`\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:` CREATE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` USER roach `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`WITH`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` PASSWORD`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` 'Q7gc8rEdS'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`You will need this username and password to access the DB Console later.`}),`\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(Heading,{level:`2`,id:`step-4-access-the-db-console-2`,children:`Step 4. Access the DB Console`}),_jsxs(_components.p,{children:[`To access the cluster’s `,_jsx(_components.a,{href:`/docs/v24.1/ui-overview`,children:`DB Console`}),`:`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`On secure clusters, `,_jsx(_components.a,{href:`/docs/v24.1/ui-overview#db-console-access`,children:`certain pages of the DB Console`}),` can only be accessed by `,_jsx(_components.code,{children:`admin`}),` users.`]}),`\n`,_jsxs(_components.p,{children:[`Get a shell into the pod and start the CockroachDB `,_jsx(_components.a,{href:`/docs/v24.1/cockroach-sql`,children:`built-in SQL client`}),`:`]}),`\n`,_jsx(_components.p,{children:`$ kubectl exec -it cockroachdb-client-secure \\\\ —./cockroach sql \\\\ —certs-dir=/cockroach-certs \\\\ —host=my-release-cockroachdb-public`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Assign `,_jsx(_components.code,{children:`roach`}),` to the `,_jsx(_components.code,{children:`admin`}),` role (you only need to do this once):`]}),`\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:` GRANT`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` admin`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TO`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` roach;`})]}),`\n`]})})}),`\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`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`In a new terminal window, port-forward from your local machine to the `,_jsx(_components.code,{children:`cockroachdb-public`}),` service:`]}),`\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:` port-forward`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` service/my-release-cockroachdb-public`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:` 8080`})]}),`\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:`Forwarding from 127.0.0.1:8080 -> 8080`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`port-forward`}),` command must be run on the same machine as the web browser in which you want to view the DB Console. If you have been running these commands from a cloud instance or other non-local shell, you will not be able to view the UI without configuring `,_jsx(_components.code,{children:`kubectl`}),` locally and running the above `,_jsx(_components.code,{children:`port-forward`}),` command on your local machine.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Go to `,_jsx(_components.a,{href:`https://localhost:8080/`,children:`https://localhost:8080`}),` and log in with the username and password you created earlier.`]}),`\n`,_jsxs(_components.p,{children:[`If you are using Google Chrome, and you are getting an error about not being able to reach `,_jsx(_components.code,{children:`localhost`}),` because its certificate has been revoked, go to `,_jsx(_components.a,{href:`chrome://flags/#allow-insecure-localhost`,children:`chrome://flags/#allow-insecure-localhost`}),`, enable “Allow invalid certificates for resources loaded from localhost”, and then restart the browser. Enabling this Chrome feature degrades security for all sites running on `,_jsx(_components.code,{children:`localhost`}),`, not just CockroachDB’s DB Console, so be sure to enable the feature only temporarily.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`In the UI, verify that the cluster is running as expected:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`View the `,_jsx(_components.a,{href:`/docs/v24.1/ui-cluster-overview-page#node-list`,children:`Node List`}),` to ensure that all nodes successfully joined the cluster.`]}),`\n`,_jsxs(_components.li,{children:[`Click the `,_jsx(_components.strong,{children:`Databases`}),` tab on the left to verify that `,_jsx(_components.code,{children:`bank`}),` is listed.`]}),`\n`]}),`\n`]}),`\n`]})]}),_jsxs(Tab,{title:`Manual configs`,id:`manual-configs`,\"data-child-heading-ids\":`[\"configure-the-cluster\",\"create-certificates\",\"initialize-the-cluster-2\",\"step-3-use-the-built-in-sql-client-3\",\"step-4-access-the-db-console-3\"]`,children:[_jsx(Heading,{level:`3`,id:`configure-the-cluster`,children:`Configure the cluster`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Download and modify our `,_jsx(_components.a,{href:`/docs/v24.1/cockroach/cloud/kubernetes/bring-your-own-certs/cockroachdb-statefulset.yaml`,children:`StatefulSet configuration`}),`:`]}),`\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:` curl`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -O`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` https://www.cockroachlabs.com/docs/files/cockroach/cloud/kubernetes/bring-your-own-certs/cockroachdb-statefulset.yaml`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Update `,_jsx(_components.code,{children:`secretName`}),` with the name of the corresponding node secret.`]}),`\n`,_jsxs(_components.p,{children:[`The secret names depend on your method for generating secrets. For example, if you follow the below `,_jsxs(_components.a,{href:`#create-certificates`,children:[`steps using `,_jsx(_components.code,{children:`cockroach cert`})]}),`, use this secret name:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-dark\":`#89B4FA`},children:`secret`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89B4FA`,\"--shiki-dark\":`#89B4FA`},children:` secretName`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:`:`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb.node`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`The StatefulSet configuration deploys CockroachDB into the `,_jsx(_components.code,{children:`default`}),` namespace. To use a different namespace, search for `,_jsx(_components.code,{children:`kind: RoleBinding`}),` and change its `,_jsx(_components.code,{children:`subjects.namespace`}),` property to the name of the namespace. Otherwise, a `,_jsx(_components.code,{children:`failed to read secrets`}),` error occurs when you attempt to follow the steps in `,_jsx(_components.a,{href:`#initialize-the-cluster`,children:`Initialize the cluster`}),`.`]}),`\n`]}),`\n`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`By default, this manifest specifies CPU and memory resources that are appropriate for the virtual machines used in this deployment example. On a production cluster, you should substitute values that are appropriate for your machines and workload. For details on configuring your deployment, see `,_jsx(_components.a,{href:`/docs/v24.1/configure-cockroachdb-kubernetes?filters=manual`,children:`Configure the Cluster`}),`.`]})}),_jsx(Heading,{level:`3`,id:`create-certificates`,children:`Create certificates`}),_jsxs(_components.p,{children:[`The StatefulSet configuration sets all CockroachDB nodes to log to `,_jsx(_components.code,{children:`stderr`}),`, so if you ever need access to a pod/node’s logs to troubleshoot, use `,_jsx(_components.code,{children:`kubectl logs \u003cpodname>`}),` rather than checking the log on the persistent volume.`]}),_jsxs(_components.p,{children:[`The below steps use `,_jsxs(_components.a,{href:`/docs/v24.1/cockroach-cert`,children:[_jsx(_components.code,{children:`cockroach cert`}),` commands`]}),` to quickly generate and sign the CockroachDB node and client certificates. Read our `,_jsx(_components.a,{href:`/docs/v24.1/authentication#using-digital-certificates-with-cockroachdb`,children:`Authentication`}),` docs to learn about other methods of signing certificates.`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Create two directories:`}),`\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:` mkdir`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` certs`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` my-safe-directory`})]}),`\n`]})})}),`\n`]}),`\n`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Directory`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`certs`})}),_jsx(_components.td,{children:`You’ll generate your CA certificate and all node and client certificates and keys in this directory.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`my-safe-directory`})}),_jsx(_components.td,{children:`You’ll generate your CA key in this directory and then reference the key when generating node and client certificates.`})]})]})]}),_jsxs(_components.ol,{start:`2`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Create the CA certificate and key pair:`}),`\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:` cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cert`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` create-ca`}),_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=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:`--ca-key=my-safe-directory/ca.key`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Create a client certificate and key pair for the root user:`}),`\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:` cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cert`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` create-client`}),_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:`root `}),_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=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:`--ca-key=my-safe-directory/ca.key`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Upload the client certificate and key to the Kubernetes cluster as a secret:`}),`\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:` create`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` secret`}),_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:`generic `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`cockroachdb.client.root`}),_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:`--from-file=certs`})}),`\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:`secret/cockroachdb.client.root created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Create the certificate and key pair for your CockroachDB nodes:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,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:` cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cert`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` create-node`}),_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:`localhost `}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`127.0.0.1`}),_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-public `}),_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-public.default `}),_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-public.default.svc.cluster.local `}),_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 `}),_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.default `}),_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.default.svc.cluster.local `}),_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=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:`--ca-key=my-safe-directory/ca.key`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Upload the node certificate and key to the Kubernetes cluster as a secret:`}),`\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:` create`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` secret`}),_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:`generic `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`cockroachdb.node`}),_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:`--from-file=certs`})}),`\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:`secret/cockroachdb.node created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Check that the secrets were created on 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:` get`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` secrets`})]}),`\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:`NAME TYPE DATA AGE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb.client.root Opaque 3 41m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb.node Opaque 5 14s`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`default-token-6qjdb kubernetes.io/service-account-token 3 4m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`initialize-the-cluster-2`,children:`Initialize the cluster`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Use the config file you downloaded to create the StatefulSet that automatically creates 3 pods, each running a CockroachDB node:`}),`\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:` create`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` -f`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` cockroachdb-statefulset.yaml`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`serviceaccount/cockroachdb created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`role.rbac.authorization.k8s.io/cockroachdb created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`rolebinding.rbac.authorization.k8s.io/cockroachdb created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`service/cockroachdb-public created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`service/cockroachdb created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`poddisruptionbudget.policy/cockroachdb-budget created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`statefulset.apps/cockroachdb created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Initialize the CockroachDB cluster:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Confirm that three pods are `,_jsx(_components.code,{children:`Running`}),` successfully. Note that they will not be considered `,_jsx(_components.code,{children:`Ready`}),` until after the cluster has been initialized:`]}),`\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:`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:`NAME READY STATUS RESTARTS AGE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-0 0/1 Running 0 2m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-1 0/1 Running 0 2m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-2 0/1 Running 0 2m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Confirm that the persistent volumes and corresponding claims were created successfully for all three pods:`}),`\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:` pv`})]}),`\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:`NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`pvc-9e435563-fb2e-11e9-a65c-42010a8e0fca 100Gi RWO Delete Bound default/datadir-cockroachdb-0 standard 51m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`pvc-9e47d820-fb2e-11e9-a65c-42010a8e0fca 100Gi RWO Delete Bound default/datadir-cockroachdb-1 standard 51m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`pvc-9e4f57f0-fb2e-11e9-a65c-42010a8e0fca 100Gi RWO Delete Bound default/datadir-cockroachdb-2 standard 51m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Run `,_jsx(_components.code,{children:`cockroach init`}),` on one of the pods to complete the node startup process and have them join together as a cluster:`]}),`\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-0`}),_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/cockroach`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` init`}),_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:`--certs-dir=/cockroach/cockroach-certs`})}),`\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:`Cluster successfully initialized`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Confirm that cluster initialization has completed successfully. The job should be considered successful and the Kubernetes pods should soon be considered `,_jsx(_components.code,{children:`Ready`}),`:`]}),`\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:`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:`NAME READY STATUS RESTARTS AGE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-0 1/1 Running 0 3m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-1 1/1 Running 0 3m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cockroachdb-2 1/1 Running 0 3m`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),_jsx(Heading,{level:`2`,id:`step-3-use-the-built-in-sql-client-3`,children:`Step 3. Use the built-in SQL client`}),_jsxs(_components.p,{children:[`To use the CockroachDB SQL client, first launch a secure pod running the `,_jsx(_components.code,{children:`cockroach`}),` binary.`]}),_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:` create`}),_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:`-f `}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:`https://www.cockroachlabs.com/docs/files/cockroach/cloud/kubernetes/bring-your-own-certs/client.yaml`})]}),`\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:`pod/cockroachdb-client-secure created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Get a shell into the pod and start the CockroachDB `,_jsx(_components.a,{href:`/docs/v24.1/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`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,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:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Welcome to the cockroach SQL interface.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# All statements must be terminated by a semicolon.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# To exit: CTRL + D.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Client version: CockroachDB CCL v19.1.0 (x86_64-unknown-linux-gnu, built 2019/04/29 18:36:40, go1.11.6)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Server version: CockroachDB CCL v19.1.0 (x86_64-unknown-linux-gnu, built 2019/04/29 18:36:40, go1.11.6)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Cluster ID: 256a8705-e348-4e3a-ab12-e1aba96857e4`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Enter \\\\? for a brief introduction.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`root@cockroachdb-public:26257/defaultdb>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`This pod will continue running indefinitely, so any time you need to reopen the built-in SQL client or run any other `,_jsxs(_components.a,{href:`/docs/v24.1/cockroach-commands`,children:[_jsx(_components.code,{children:`cockroach`}),` client commands`]}),` (e.g., `,_jsx(_components.code,{children:`cockroach node`}),`), repeat step 2 using the appropriate `,_jsx(_components.code,{children:`cockroach`}),` command.`]}),`\n`,_jsxs(_components.p,{children:[`If you’d prefer to delete the pod and recreate it when needed, run `,_jsx(_components.code,{children:`kubectl delete pod cockroachdb-client-secure`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Run some basic `,_jsx(_components.a,{href:`/docs/v24.1/learn-cockroachdb-sql`,children:`CockroachDB SQL statements`}),`:`]}),`\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:` CREATE`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` DATABASE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank;`})]}),`\n`]})})}),`\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:` CREATE`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TABLE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank.accounts (id `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`INT`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` PRIMARY KEY`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`, balance `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`DECIMAL`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`);`})]}),`\n`]})})}),`\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:` INSERT INTO`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank.accounts `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`VALUES`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` (`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`1`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`, `}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`1000`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`.`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:`50`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`);`})]}),`\n`]})})}),`\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:` SELECT`}),_jsx(_components.span,{style:{color:`#94E2D5`,\"--shiki-dark\":`#94E2D5`},children:` *`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` FROM`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` bank.accounts;`})]}),`\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:` id | balance`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`+----+---------+`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` 1 | 1000.50`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`(1 row)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/docs/v24.1/create-user#create-a-user-with-a-password`,children:`Create a user with a password`}),`:`]}),`\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:` CREATE`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` USER roach `}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:`WITH`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` PASSWORD`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` 'Q7gc8rEdS'`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`You will need this username and password to access the DB Console later.`}),`\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(Heading,{level:`2`,id:`step-4-access-the-db-console-3`,children:`Step 4. Access the DB Console`}),_jsxs(_components.p,{children:[`To access the cluster’s `,_jsx(_components.a,{href:`/docs/v24.1/ui-overview`,children:`DB Console`}),`:`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`On secure clusters, `,_jsx(_components.a,{href:`/docs/v24.1/ui-overview#db-console-access`,children:`certain pages of the DB Console`}),` can only be accessed by `,_jsx(_components.code,{children:`admin`}),` users.`]}),`\n`,_jsxs(_components.p,{children:[`Get a shell into the pod and start the CockroachDB `,_jsx(_components.a,{href:`/docs/v24.1/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`,_jsxs(_components.p,{children:[`Assign `,_jsx(_components.code,{children:`roach`}),` to the `,_jsx(_components.code,{children:`admin`}),` role (you only need to do this once):`]}),`\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:` GRANT`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` admin`}),_jsx(_components.span,{style:{color:`#CBA6F7`,\"--shiki-dark\":`#CBA6F7`},children:` TO`}),_jsx(_components.span,{style:{color:`#CDD6F4`,\"--shiki-dark\":`#CDD6F4`},children:` roach;`})]}),`\n`]})})}),`\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`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`In a new terminal window, port-forward from your local machine to the `,_jsx(_components.code,{children:`cockroachdb-public`}),` service:`]}),`\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:` port-forward`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` service/cockroachdb-public`}),_jsx(_components.span,{style:{color:`#FAB387`,\"--shiki-dark\":`#FAB387`},children:` 8080`})]}),`\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:`Forwarding from 127.0.0.1:8080 -> 8080`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`port-forward`}),` command must be run on the same machine as the web browser in which you want to view the DB Console. If you have been running these commands from a cloud instance or other non-local shell, you will not be able to view the UI without configuring `,_jsx(_components.code,{children:`kubectl`}),` locally and running the above `,_jsx(_components.code,{children:`port-forward`}),` command on your local machine.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Go to `,_jsx(_components.a,{href:`https://localhost:8080/`,children:`https://localhost:8080`}),` and log in with the username and password you created earlier.`]}),`\n`,_jsxs(_components.p,{children:[`If you are using Google Chrome, and you are getting an error about not being able to reach `,_jsx(_components.code,{children:`localhost`}),` because its certificate has been revoked, go to `,_jsx(_components.a,{href:`chrome://flags/#allow-insecure-localhost`,children:`chrome://flags/#allow-insecure-localhost`}),`, enable “Allow invalid certificates for resources loaded from localhost”, and then restart the browser. Enabling this Chrome feature degrades security for all sites running on `,_jsx(_components.code,{children:`localhost`}),`, not just CockroachDB’s DB Console, so be sure to enable the feature only temporarily.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`In the UI, verify that the cluster is running as expected:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`View the `,_jsx(_components.a,{href:`/docs/v24.1/ui-cluster-overview-page#node-list`,children:`Node List`}),` to ensure that all nodes successfully joined the cluster.`]}),`\n`,_jsxs(_components.li,{children:[`Click the `,_jsx(_components.strong,{children:`Databases`}),` tab on the left to verify that `,_jsx(_components.code,{children:`bank`}),` is listed.`]}),`\n`]}),`\n`]}),`\n`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`step-5-stop-the-cluster`,children:`Step 5. Stop the cluster`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`If you plan to restart the cluster`}),`, use the `,_jsx(_components.code,{children:`minikube stop`}),` command. This shuts down the minikube virtual machine but preserves all the resources you created:`]}),`\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:`minikube`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` stop`})]}),`\n`]})})}),`\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:`Stopping local Kubernetes cluster...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Machine stopped.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`You can restore the cluster to its previous state with `,_jsx(_components.code,{children:`minikube start`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`If you do not plan to restart the cluster`}),`, use the `,_jsx(_components.code,{children:`minikube delete`}),` command. This shuts down and deletes the minikube virtual machine and all the resources you created, including persistent volumes:`]}),`\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:`minikube`}),_jsx(_components.span,{style:{color:`#A6E3A1`,\"--shiki-dark\":`#A6E3A1`},children:` delete`})]}),`\n`]})})}),`\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:`Deleting local Kubernetes cluster...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Machine deleted.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`To retain logs, copy them from each pod’s `,_jsx(_components.code,{children:`stderr`}),` before deleting the cluster and all its resources. To access a pod’s standard error stream, run `,_jsx(_components.code,{children:`kubectl logs \u003cpodname>`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`see-also`,children:`See also`}),`\n`,_jsx(_components.p,{children:`Explore other CockroachDB benefits and features:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/v24.1/demo-replication-and-rebalancing`,children:`Replication \u0026 Rebalancing`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/v24.1/demo-fault-tolerance-and-recovery`,children:`Fault Tolerance \u0026 Recovery`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/v24.1/demo-low-latency-multi-region-deployment`,children:`Low Latency Multi-Region Deployment`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/v24.1/demo-serializable`,children:`Serializable Transactions`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/v24.1/demo-automatic-cloud-migration`,children:`Cross-Cloud Migration`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/v24.1/orchestrate-a-local-cluster-with-kubernetes-insecure`,children:`Orchestration`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/v24.1/demo-json-support`,children:`JSON Support`})}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`You might also want to learn how to `,_jsx(_components.a,{href:`/docs/v24.1/deploy-cockroachdb-with-kubernetes`,children:`orchestrate a production deployment of CockroachDB with Kubernetes`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{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":"Deploy a Local Cluster in Kubernetes","old_description":"Deploy a local 3-node CockroachDB cluster with Kubernetes.","canonical":"https://docs.cockroachlabs.com/docs/stable/cockroachdb-operator-overview","description":null,"href":"/docs/v24.1/orchestrate-a-local-cluster-with-kubernetes"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Limitations","slug":"limitations","depth":2,"children":[{"title":"Kubernetes version","slug":"kubernetes-version","depth":4,"children":[]},{"title":"Kubernetes Operator","slug":"kubernetes-operator","depth":4,"children":[]},{"title":"Helm version","slug":"helm-version","depth":4,"children":[]},{"title":"Network","slug":"network","depth":4,"children":[]},{"title":"Resources","slug":"resources","depth":4,"children":[]},{"title":"Storage","slug":"storage","depth":4,"children":[]}]},{"title":"Before you begin","slug":"before-you-begin","depth":2,"children":[]},{"title":"Step 1. Start Kubernetes","slug":"step-1-start-kubernetes","depth":2,"children":[]},{"title":"Step 2. Start CockroachDB","slug":"step-2-start-cockroachdb","depth":2,"children":[{"title":"Install the Operator","slug":"install-the-operator","depth":3,"children":[],"tabId":"public-operator"},{"title":"Initialize the cluster","slug":"initialize-the-cluster","depth":3,"children":[],"tabId":"public-operator"}]},{"title":"Step 3. Use the built-in SQL client","slug":"step-3-use-the-built-in-sql-client","depth":2,"children":[],"tabId":"public-operator"},{"title":"Step 4. Access the DB Console","slug":"step-4-access-the-db-console","depth":2,"children":[],"tabId":"public-operator"},{"title":"Step 3. Use the built-in SQL client","slug":"step-3-use-the-built-in-sql-client-2","depth":2,"children":[],"tabId":"helm"},{"title":"Step 4. Access the DB Console","slug":"step-4-access-the-db-console-2","depth":2,"children":[],"tabId":"helm"},{"title":"Configure the cluster","slug":"configure-the-cluster","depth":3,"children":[],"tabId":"manual-configs"},{"title":"Create certificates","slug":"create-certificates","depth":3,"children":[],"tabId":"manual-configs"},{"title":"Initialize the cluster","slug":"initialize-the-cluster-2","depth":3,"children":[],"tabId":"manual-configs"},{"title":"Step 3. Use the built-in SQL client","slug":"step-3-use-the-built-in-sql-client-3","depth":2,"children":[],"tabId":"manual-configs"},{"title":"Step 4. Access the DB Console","slug":"step-4-access-the-db-console-3","depth":2,"children":[],"tabId":"manual-configs"},{"title":"Step 5. Stop the cluster","slug":"step-5-stop-the-cluster","depth":2,"children":[]},{"title":"See also","slug":"see-also","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cockroachlabs/4695317e415d4eba/kapa.js","/_mintlify/custom/cockroachlabs/40fb45a3cfe42c92/copy-code-prompt.js","/_mintlify/custom/cockroachlabs/3f343c9e8c40397a/collapse-nav.js"],"subdomain":"cockroachlabs","siteName":"CockroachDB","title":"Deploy a Local Cluster in Kubernetes - CockroachDB","navMaps":{"firstHrefInVersion":{"v26.4":{"href":"/docs/stable","matchLevel":4},"v26.3":{"href":"/docs/v26.3","matchLevel":4},"v26.2":{"href":"/docs/v26.2","matchLevel":4},"v26.1":{"href":"/docs/v26.1","matchLevel":4},"v25.4":{"href":"/docs/v25.4/orchestrate-a-local-cluster-with-kubernetes","matchLevel":1,"canonicalOverride":true},"v25.3":{"href":"/docs/v25.3/orchestrate-a-local-cluster-with-kubernetes","matchLevel":1,"canonicalOverride":true},"v25.2":{"href":"/docs/v25.2/orchestrate-a-local-cluster-with-kubernetes","matchLevel":1,"canonicalOverride":true},"v25.1":{"href":"/docs/v25.1/orchestrate-a-local-cluster-with-kubernetes","matchLevel":1,"canonicalOverride":true},"v24.3":{"href":"/docs/v24.3/orchestrate-a-local-cluster-with-kubernetes","matchLevel":1,"canonicalOverride":true},"v24.1":{"href":"/docs/v24.1/orchestrate-a-local-cluster-with-kubernetes","matchLevel":0},"v23.2":{"href":"/docs/v23.2/orchestrate-a-local-cluster-with-kubernetes","matchLevel":1,"canonicalOverride":true},"v23.1":{"href":"/docs/v23.1/orchestrate-a-local-cluster-with-kubernetes","matchLevel":1,"canonicalOverride":true}},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T17:55:42.087Z","originalFileLocation":"docs/v24.1/orchestrate-a-local-cluster-with-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=\"Deploy a Local Cluster in Kubernetes - 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/cockroachdb-operator-overview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cockroachlabs.mintlify.site/_mintlify/api/og/v2?division=Deploy+in+Kubernetes\u0026amp;title=Deploy+a+Local+Cluster+in+Kubernetes\u0026amp;theme=4aeed7318cb28bd50868adb3\u0026amp;signature=5d647b4bb4d9ee15f7f3e308e393a3ffcdb4dfbcbd41d5d9c8c2e744118ab45f\">\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=\"Deploy a Local Cluster in Kubernetes - CockroachDB\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cockroachlabs.mintlify.site/_mintlify/api/og/v2?division=Deploy+in+Kubernetes\u0026amp;title=Deploy+a+Local+Cluster+in+Kubernetes\u0026amp;theme=4aeed7318cb28bd50868adb3\u0026amp;signature=5d647b4bb4d9ee15f7f3e308e393a3ffcdb4dfbcbd41d5d9c8c2e744118ab45f\">\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/cockroachdb-operator-overview\">\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/orchestrate-a-local-cluster-with-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/cockroachdb-operator-overview#webpage\",\"url\":\"https://docs.cockroachlabs.com/docs/stable/cockroachdb-operator-overview\",\"name\":\"Deploy a Local Cluster in Kubernetes\",\"dateModified\":\"2026-11-12T17:55:42.087Z\",\"isPartOf\":{\"@id\":\"https://docs.cockroachlabs.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cockroachlabs.com/docs/stable/cockroachdb-operator-overview#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cockroachlabs.com/docs/stable/cockroachdb-operator-overview#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 Locally\",\"item\":\"https://docs.cockroachlabs.com/docs/v24.1/secure-a-cluster\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Deploy in Kubernetes\",\"item\":\"https://docs.cockroachlabs.com/docs/v24.1/orchestrate-a-local-cluster-with-kubernetes\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Deploy a Local Cluster in Kubernetes\",\"item\":\"https://docs.cockroachlabs.com/docs/stable/cockroachdb-operator-overview\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cockroachlabs.com/docs/stable/cockroachdb-operator-overview#article\",\"headline\":\"Deploy a Local Cluster in Kubernetes\",\"name\":\"Deploy a Local Cluster in Kubernetes\",\"url\":\"https://docs.cockroachlabs.com/docs/stable/cockroachdb-operator-overview\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cockroachlabs.com/docs/stable/cockroachdb-operator-overview#webpage\"},\"dateModified\":\"2026-11-12T17:55:42.087Z\",\"publisher\":{\"@id\":\"https://docs.cockroachlabs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cockroachlabs.com#website\"}}]}\u003c/script>","agentPointerHref":"/docs/v24.1/orchestrate-a-local-cluster-with-kubernetes.md","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","default":true,"tag":"Stable","pages":[{"title":"v26.4","href":"/docs/stable"}]},{"version":"v26.3","pages":[{"title":"v26.3","href":"/docs/v26.3"}]},{"version":"v26.2","pages":[{"title":"v26.2","href":"/docs/v26.2"}]},{"version":"v26.1","pages":[{"title":"v26.1","href":"/docs/v26.1"}]},{"version":"v25.4","tag":"LTS","pages":[{"title":"v25.4","href":"/docs/v25.4/orchestrate-a-local-cluster-with-kubernetes"}]},{"version":"v25.3","tag":"Unsupported","pages":[{"title":"v25.3","href":"/docs/v25.3/orchestrate-a-local-cluster-with-kubernetes"}]},{"version":"v25.2","tag":"LTS","pages":[{"title":"v25.2","href":"/docs/v25.2/orchestrate-a-local-cluster-with-kubernetes"}]},{"version":"v25.1","tag":"Unsupported","pages":[{"title":"v25.1","href":"/docs/v25.1/orchestrate-a-local-cluster-with-kubernetes"}]},{"version":"v24.3","tag":"LTS","pages":[{"title":"v24.3","href":"/docs/v24.3/orchestrate-a-local-cluster-with-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"}]},{"title":"Deploy a Local Cluster in Docker (Insecure)","description":null,"href":"/docs/v24.1/start-a-local-cluster-in-docker"},{"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)","description":null,"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","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","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/orchestrate-a-local-cluster-with-kubernetes"}]},{"version":"v23.1","tag":"Unsupported","pages":[{"title":"v23.1","href":"/docs/v23.1/orchestrate-a-local-cluster-with-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"}]}]},"basePath":"","title":"Deploy a Local Cluster in Kubernetes - CockroachDB","buildId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","deploymentId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","dynamics":[],"chunks":[]}