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, 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