Uninstall Kubernetes Operator for Apache Cassandra and related resources in Kubernetes

Uninstalling the resources shown in this topic deletes the workloads, the pods, and all the data associated with the deployments, including all Cassandra or DSE databases and their data. Before uninstalling, verify that you have accounted for any and all dependencies with apps and users of the resources.

To uninstall Kubernetes Operator for Apache Cassandra and related resources in Kubernetes, use the kubectl delete command.

On a local machine where you have authorized access to the Kubernetes (K8s) cluster, use the following commands to remove the CassandraDatacenter, the Kubernetes Operator for Apache Cassandra, and the storage class.

The following examples are for a GKE 1.16 environment where the Cassandra 3.11.7 image was deployed. Adjust the commands based on your cloud, storage, and database options.

  1. Uninstall a deployed CassandraDatacenter from the Kubernetes cluster:

    kubectl delete cassdcs --all-namespaces --all
    Result
    cassandradatacenter.cassandra.datastax.com "dc1" deleted
  2. Uninstall a deployed Kubernetes Operator for Apache Cassandra from the Kubernetes cluster:

    kubectl delete -f https://raw.githubusercontent.com/k8ssandra/cass-operator/v1.7.1/docs/user/cass-operator-manifests.yaml
    Result
    namespace "cass-operator" deleted
    serviceaccount "cass-operator" deleted
    secret "cass-operator-webhook-config" deleted
    customresourcedefinition.apiextensions.k8s.io "cassandradatacenters.cassandra.datastax.com" deleted
    clusterrole.rbac.authorization.k8s.io "cass-operator-cluster-role" deleted
    clusterrolebinding.rbac.authorization.k8s.io "cass-operator" deleted
    role.rbac.authorization.k8s.io "cass-operator" deleted
    rolebinding.rbac.authorization.k8s.io "cass-operator" deleted
    service "cassandradatacenter-webhook-service" deleted
    deployment.apps "cass-operator" deleted
    validatingwebhookconfiguration.admissionregistration.k8s.io "cassandradatacenter-webhook-registration" deleted
  3. Uninstall the deployed storage class:

    kubectl delete -f https://raw.githubusercontent.com/k8ssandra/cass-operator/v1.7.1/operator/k8s-flavors/gke/storage.yaml
    Result
    storageclass.storage.k8s.io "server-storage" deleted
  4. Verify the deletions:

    kubectl -n cass-operator get pods
    Result
    No resources found in cass-operator namespace.

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