kind icon indicating copy to clipboard operation
kind copied to clipboard

Delete the default cluster with `kind delete cluster`

Open cedricclyburn opened this issue 1 year ago • 1 comments

What would you like to be added:

When trying to delete my existing cluster, I had some friction as I didn't realize that kind delete cluster by default only deletes the default named cluster "kind". I was wondering if there's any way, in a basic situation where the user only has one cluster, to have kind delete cluster delete the single cluster, even if the name is not "kind" (for example "kind-cluster").

Why is this needed:

Ease the basic commands for a new Kind user to get setup with Kind. Currently the response below insinuates some sort of action has been taken, but nothing has occurred if the user's cluster is, for example, "kind-cluster" or "cluster".

% kind delete cluster          
Deleting cluster "kind" 

cedricclyburn avatar Aug 31 '23 18:08 cedricclyburn

This would be a breaking behavior change, and all commands that do not act on all clusters require --name if it's not the default. This is similar to e.g. kubectl --namespace.

I think you should use kind delete clusters -A.

BenTheElder avatar Aug 31 '23 19:08 BenTheElder