Quickstart for Kubernetes Operator for Apache Cassandra

Apply pre-configured Kubernetes Operator for Apache Cassandra manifests and related definitions to your Kubernetes cluster.

Prerequisites

  • Create a Kubernetes cluster where you will set up Kubernetes Operator for Apache Cassandra® and Cassandra/DSE resources.

  • Authorize connections between your local machine where you will run kubectl commands and your Kubernetes cluster, as explained in Create a Kubernetes cluster.

  • Install kubectl.

  • Recommended: The ability to download DataStax Docker Hub images from within the Kubernetes cluster.

  • Have at least one Kubernetes worker node per Cassandra or DSE instance.

Quick start

The following kubectl commands create Kubernetes Operator for Apache Cassandra and Cassandra/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 Kubernetes Operator for Apache Cassandra 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
  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 this GitHub page.

    • Here is the YAML manifest applied in this storage configuration example.

  3. Finally, run the following kubectl command to apply a YAML manifest that defines 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

    An alternative command is to create the CassandraDatacenter with the DataStax Enterprise (DSE) 6.8.4 image, with three Kubernetes worker nodes on one rack, using:

    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 the complete set of database-specific datacenter configurations, DSE or Cassandra, see this GitHub page.

    • Here is the YAML manifest applied in this Cassandra 3.11.7 datacenter configuration example.

Resources deployed and visible in Cloud Console

With the Kubernetes Operator for Apache Cassandra 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 Kubernetes Operator for Apache Cassandra 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 Kubernetes Operator for Apache Cassandra 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 Kubernetes Operator for Apache Cassandra and Cassandra resources in the Kubernetes cluster.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax, an IBM Company | 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: +1 (650) 389-6000, info@datastax.com