Quickstart for the Kubernetes Operator for Apache Cassandra

Get started with automating the process of deploying and managing Apache Cassandra® or DataStax Enterprise (DSE) in a Kubernetes (K8s) cluster.

For other install options, see Installation options.

Prepare the infrastructure

For guided instructions, see Create a Kubernetes cluster.

  • Create a Kubernetes cluster and authorize connections between the cluster and your local machine.

    The connection to your local machine is required to run kubectl commands.

  • Install kubectl.

  • Recommended: Make sure you can download DataStax Docker images from within the Kubernetes cluster.

  • Have at least one Kubernetes worker node for each planned Cassandra or DSE instance.

After you prepare the infrastructure, follow the remainder of this quickstart to apply pre-configured Cassandra Operator manifests and related definitions to the Kubernetes environment, including deploying the Cassandra or DSE database. Then, you’ll connect to the deployed database from inside or outside the K8s cluster.

Create resources

The following kubectl commands create the Cassandra Operator and Cassandra or DSE resources on an existing GKE cloud that is running Google Kubernetes Engine (GKE) version 1.16. Adjust the commands based on your cloud, storage, and database options.

  1. Run this kubectl command to reference a YAML file that applies the Cassandra Operator manifest’s definitions to the connected Kubernetes cluster.

    kubectl create -f https://raw.githubusercontent.com/k8ssandra/cass-operator/v1.7.1/docs/user/cass-operator-manifests.yaml

    For more manifest examples, see the Cassandra Operator GitHub repository.

  2. Run the following kubectl command to apply a YAML manifest that defines the storage settings to use for Cassandra nodes in a cluster.

    An example is SSD as a storage type. In this case, storage settings are for a GKE cluster. Kubernetes uses the StorageClass resource as an abstraction layer between pods needing persistent storage and the physical storage resources that a specific Kubernetes cluster can provide.

    kubectl create -f https://raw.githubusercontent.com/k8ssandra/cass-operator/v1.7.1/operator/k8s-flavors/gke/storage.yaml

    For more options, see the Cassandra Operator GitHub repository.

  3. Apply a YAML manifest that defines a CassandraDatacenter.

    The following example creates a CassandraDatacenter with the open-source Apache Cassandra 3.11.7 image with three nodes on one rack in the Kubernetes cluster:

    kubectl -n cass-operator create -f https://raw.githubusercontent.com/k8ssandra/cass-operator/v1.7.1/operator/example-cassdc-yaml/cassandra-3.11.x/example-cassdc-minimal.yaml

    Alternatively, this example creates a CassandraDatacenter with the DataStax Enterprise (DSE) 6.8.4 image and three Kubernetes worker nodes on one rack:

    kubectl -n cass-operator create -f https://raw.githubusercontent.com/k8ssandra/cass-operator/master/operator/example-cassdc-yaml/dse-6.8.x/example-cassdc-minimal.yaml

    For more examples, see the Cassandra Operator GitHub repository.

Inspect resources in the Google Cloud Console

With the Cassandra Operator manifest, storage class, and datacenter definitions applied to the Kubernetes cluster, view the resources created and visible in the Kubernetes cluster. This GKE example uses the Google Cloud Console (aka Cloud Console), and the resources already established in Create a Kubernetes cluster.

  1. Navigate to the Kubernetes Engine page in Cloud Console, and log into your account.

  2. If you have not already done so, select your project.

  3. On the Clusters tab, click the link for your cluster’s name.

  4. Navigate through the Details, Storage, and Nodes sections to familiarize yourself with the created resources.

  5. Click Workloads.

    Workloads are deployable computing units that can be created and managed in the Kubernetes cluster. The Cassandra Operator manifest applied the YAML file applied that defined the cass-operator namespace and workload.

  6. Click the Cluster link on the Workloads page to load details about the Cassandra Operator and Cassandra deployments in the Kubernetes cluster.

  7. Select Services & Ingress to see how the Service labels for the deployed cluster1 Cassandra cluster and for the dc1 datacenter correspond to the YAML manifest applied using kubectl earlier. Notice the three serving pods. Services are sets of pods with a network endpoint that can be used for discovery and load balancing. Ingresses are collections of rules for routing external HTTP or HTTPS traffic to Services. From the initial Services tab, click the cluster1-dc1-service to get that service’s status.

  8. For more details, scroll to the Serving pods section, and select the link for one of the serving pods. The Cloud Console switches to the Workloads tab, and the Pod details page includes the status labels, such as cassandra.datastax.com/node-state: Started and additional metadata. Scroll down to the Containers section and notice the running container for the cassandra 3.11.7 image. This container is deployed to your Kubernetes cluster and matches the YAML configuration applied earlier in this topic.

While many more options are available in Cloud Console, this introduction familiarizes you with the basics, and shows how applying the provided YAML files results in the creation and deployment of those Cassandra Operator and Cassandra resources in the Kubernetes cluster.

Next steps

Connect to your database on your cluster:

With your database resources and connections in place, you can then use the Cassandra Operator to manage Cassandra and DSE resources in your Kubernetes cluster.

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | Privacy policy | Terms of use Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM