Delete a NebulaGraph cluster
This topic explains how to delete a NebulaGraph cluster created using NebulaGraph Operator.
Usage limitations
- Deletion is only supported for NebulaGraph clusters created with the NebulaGraph Operator.
- You cannot delete a NebulaGraph cluster that has deletion protection enabled. For more information, see Configure deletion protection.
Delete a NebulaGraph cluster using kubectl
- View all created clusters.
kubectl get nc --all-namespaces
Example output:
NAMESPACE NAME READY GRAPHD-DESIRED GRAPHD-READY METAD-DESIRED METAD-READY STORAGED-DESIRED STORAGED-READY AGE
default nebula True 2 2 3 3 3 3 38h
nebula nebula2 True 1 1 1 1 1 1 2m7s
- Delete a cluster. For example, run the following command to delete a cluster named
nebula2:
kubectl delete nc nebula2 -n nebula
Example output:
nebulacluster.nebula-graph.io "nebula2" deleted
- Confirm the deletion.
kubectl get nc nebula2 -n nebula
Example output:
No resources found in nebula namespace.
Delete a NebulaGraph cluster using helm
- View all Helm releases.
helm list --all-namespaces
Example output:
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
nebula default 1 2023-11-06 20:16:07.913136377 +0800 CST deployed nebula-cluster-1.7.1 1.7.1
nebula-operator nebula-operator-system 3 2023-11-06 12:06:24.742397418 +0800 CST deployed nebula-operator-1.7.1 1.7.1
- View detailed information about a Helm release. For example, to view the cluster information for a Helm release named
nebula:
helm get values nebula -n default
Example output:
USER-SUPPLIED VALUES:
imagePullSecrets:
- name: secret_for_pull_image
nameOverride: nebula # The cluster name
nebula:
graphd:
image: reg.vesoft-inc.com/xx
metad:
image: reg.vesoft-inc.com/xx
licenseManagerURL: xxx:9119
storageClassName: local-sc
storaged:
image: reg.vesoft-inc.com/xx
version: v1.8.0 # The cluster version
- Uninstall a Helm release. For example, to uninstall a Helm release named
nebula:
helm uninstall nebula -n default
Example output:
release "nebula" uninstalled
Once the Helm release is uninstalled, NebulaGraph Operator will automatically remove all K8s resources associated with that release.
- Verify that the cluster resources are removed.
kubectl get nc nebula -n default
Example output:
No resources found in default namespace.