Home > Storage > PowerFlex > White Papers > CockroachDB Deployment on Dell PowerFlex with Kubernetes > Deploy CockroachDB Cluster
Before CockroachDB is deployed, the CSI driver for PowerFlex needs to be installed on the Kubernetes platform by following the CSI prerequisites and deployment steps. In this solution, CSI 2.8 is installed in the PowerFlex SDC nodes.
CockroachDB can be deployed and managed on Kubernetes using the following methods:
In this case, The Operator installation method is used while deploying the CockroachDB cluster.
Steps to install CockroachDB cluster:
kubectl apply -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.12.0/install/crds.yaml
kubectl apply -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.12.0/install/operator.yaml
kubectl config set-context --current --namespace=cockroach-operator-system
curl -O https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.12.0/examples/example.yaml
kubectl apply -f example.yaml
kubectl create -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.12.0/examples/client-secure-operator.yaml
kubectl exec -it cockroachdb-client-secure -- ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public
# Welcome to the CockroachDB SQL shell.
# All statements must be terminated by a semicolon.
# To exit, type: \q.
#
# Server version: CockroachDB CCL v23.1.11 (x86_64-pc-linux-gnu, built 2023/09/27 01:53:43, go1.19.10) (same version as client)
# Cluster ID: 2bda7cd0-ff2d-4fe5-9569-7a6d5fbae941
#
# Enter \? for a brief introduction.
#
root@cockroachdb-public:26257/defaultdb>
This completes the CockroachDB deployment on the Kubernetes platform on PowerFlex software defined storage.
CREATE USER cockroach with password ‘xyzxx!';
GRANT admin TO cockroach;
A CockroachDB user is created with admin privileges that lets the user login to the DB console. The DB Console provides details about your cluster and database configuration, and helps you optimize cluster performance. The Cluster Overview page of the DB Console displays the key metrics about your cluster and individual nodes. These include Liveness status, Replication status, Uptime, and Hardware usage.
Now, you can log in to the DB console with the user cockroach.