Uninstall Cassandra Operator and related resources in Kubernetes

Steps to uninstall Cass Operator and related resources in Kubernetes.

To uninstall Cass Operator and related resources in Kubernetes, use the kubectl delete command.
CAUTION: 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.

Uninstall examples

On a local machine where you have authorized access to the Kubernetes cluster, as described in Create a Kubernetes cluster, use the following commands to remove the CassandraDatacenter, the Cass Operator, and the storage class. The examples are for a GKE 1.16 environment in which the Cassandra 3.11.6 image was deployed. Adjust the commands based on your cloud, storage, and database options.

Uninstall a deployed CassandraDatacenter from the Kubernetes cluster:
kubectl delete cassdcs --all-namespaces --all
cassandradatacenter.cassandra.datastax.com "dc1" deleted
Uninstall a deployed Cass Operator from the Kubernetes cluster:
kubectl delete -f https://raw.githubusercontent.com/datastax/cass-operator/v1.3.0/docs/user/cass-operator-manifests-v1.16.yaml
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
Uninstall the deployed storage class:
kubectl delete -f https://raw.githubusercontent.com/datastax/cass-operator/v1.3.0/operator/k8s-flavors/gke/storage.yaml
storageclass.storage.k8s.io "server-storage" deleted
Verify the deletions:
kubectl -n cass-operator get pods
No resources found in cass-operator namespace.

What's next?

For more information about the supported Kubernetes environments, refer to each platform's documentation.
  • Open-source Kubernetes
  • Google Kubernetes Engine (GKE)
  • Pivotal Container Service (PKS)