Table of Contents
Clusters managed by Cluster API can be deleted in the same way as any other Kubernetes object.
To delete an individual cluster by name run:
kubectl delete cluster docker-cluster-one
This delete operation ensures that the cluster and all of the objects that form part of the cluster e.g. Machines, Cluster Infrastructure, are correctly deleted.
To delete all clusters managed by Cluster API run:
kubectl delete clusters --all -A
All clusters created in this tutorial use the Docker infrastructure provider and can be also managed using kind. To clean up every Kubernetes cluster created in the tutorial - returning your system to the state before creating the management cluster run:
kind delete clusters --all
More information about cleaning up objects with Docker, including containers and volumes downloaded and created as part of this tutorial, can be found in the Docker documentation.