Validated on 12 Mar 2021 • Last edited on 2 Jul 2024
cluster networking
DigitalOcean Kubernetes (DOKS) is a managed Kubernetes service. Deploy Kubernetes clusters with a fully managed control plane, high availability, autoscaling, and native integration with DigitalOcean Load Balancers and volumes. You can add node pools using shared and dedicated CPUs, and NVIDIA H100 GPUs in a single GPU or 8 GPU configuration. DOKS clusters are compatible with standard Kubernetes toolchains and the DigitalOcean API and CLI.
Destroy a Cluster Using Automation
How to Delete a Kubernetes Cluster Using the DigitalOcean CLI
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.kubernetes.delete_cluster(cluster_id="da8fda8")
Destroy a Cluster Using the Control Panel
To destroy a cluster, go to the Kubernetes page in the control panel. From the cluster’s More menu, select Destroy and click Destroy. In the Destroy Kubernetes cluster dialog box, select the resources, such as load balancers and volumes, associated with the cluster to delete them automatically when the cluster is deleted. Enter the name of the cluster, then click Destroy to confirm.
You can also delete the associated load balancers and volumes manually from the control panel after the cluster is destroyed. You will continue to be billed until the resources are destroyed .
You can also use doctl or the API to delete the associated resources automatically when you destroy a cluster.