Uninstall the Kubernetes Operator for Apache Cassandra and related resources in Kubernetes
|
Uninstalling the resources shown in this topic deletes the workloads, the pods, and all 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 the 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 CassandraOperator, and the storage class.
The following examples assume a GKE 1.16 environment with a Cassandra 3.11.7 image. Adjust the commands based on your environment and configuration.
-
Uninstall a deployed
CassandraDatacenterfrom the Kubernetes cluster:kubectl delete cassdcs --all-namespaces --allResultcassandradatacenter.cassandra.datastax.com "dc1" deleted -
Uninstall a deployed the Cassandra Operator from the Kubernetes cluster:
kubectl delete -f https://raw.githubusercontent.com/k8ssandra/cass-operator/v1.7.1/docs/user/cass-operator-manifests.yamlResultnamespace "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/k8ssandra/cass-operator/v1.7.1/operator/k8s-flavors/gke/storage.yamlResultstorageclass.storage.k8s.io "server-storage" deleted -
Verify the deletions:
kubectl -n cass-operator get podsResultNo resources found in cass-operator namespace.