Cassandra Operations Task CassandraTask

The CassandraTask is a Custom Resource Definition (CRD) that enables you to perform operational tasks on your database clusters. You create and manage these tasks using kubectl.

To create a task, you apply a YAML manifest file that specifies the operation you want to perform. For example, to restart a cluster:

kubectl apply -f restart-task.yaml

The manifest filename indicates the type of operation, such as restart-task.yaml, and the spec.jobs.command: field contains the specific task value, such as restart.

DataStax Mission Control provides several release-specific CRDs for use with the UI, kubectl, and Kubernetes API clients.

While additional CRDs exist in a Mission Control installation, you should only interact with the documented CRDs unless directed by DataStax support.

CassandraTask manifest

The following is an example of a CassandraTask manifest for a restart operation:

apiVersion: control.k8ssandra.io/v1alpha1
kind: CassandraTask
metadata:
  name: TASK_NAME
  namespace: NAMESPACE
spec:
  concurrencyPolicy: Forbid
  datacenter:
    name: DATACENTER_NAME
    namespace: NAMESPACE
  jobs:
    - args: {}
      command: restart
      name: JOB_NAME
  restartPolicy: Never
  ttlSecondsAfterFinished: 0

Replace the following:

  • TASK_NAME: A unique name for this task operation

  • NAMESPACE: The Kubernetes namespace where your database cluster is deployed

  • DATACENTER_NAME: The name of your datacenter

  • JOB_NAME: The specific job within the task

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax | 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