Deleting a Cluster

You can delete Kubernetes clusters that you no longer need.

Deleting a Cluster Using OKS CLI

To delete one of your clusters, use the cluster delete command following this syntax:

Request sample
$ oks-cli cluster delete \
    --cluster-name NAME_OF_CLUSTER \
    --project-name NAME_OF_PROJECT \
    --output json

This command contains the following options that you need to specify:

  • cluster-name: The name of the cluster that you want to delete.

  • (optional) project-name: The name of the project containing the cluster.

  • (optional) output: The output format for the response (json | yaml). By default, the response format is JSON.

You must confirm the deletion of the cluster. The following message is returned to indicate your cluster is being deleted:

Result sample
"Cluster abcd1234-ef56-gh78-ijklmn1234 successfully deleted"

The deletion of a cluster can take up to a few minutes.

Related Pages

Corresponding API Method