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.
-
Uninstall a deployed
CassandraDatacenter
from the Kubernetes cluster:kubectl delete cassdcs --all-namespaces --all
Result
cassandradatacenter.cassandra.datastax.com "dc1" deleted
-
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
-
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
-
Verify the deletions:
kubectl -n cass-operator get pods
Result
No resources found in cass-operator namespace.