What happened:
kind delete cluster does not exit non-zero when cluster doesn't exist.
What you expected to happen:
kind delete cluster exits non-zero when cluster doesn't exist.
How to reproduce it (as minimally and precisely as possible):
kind delete cluster --name=non-existent-cluster
Anything else we need to know?:
Not sure if this is intentional but other tools (e.g. kops, or say docker rm non-existent-container) do error out.
Environment:
kind version):kind v0.9.0-alpha+add83858a0adde go1.15rc1 darwin/amd64 (HEAD)kubectl version): Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:52:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-19T22:21:08Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Docker version: (use docker info):
Docker version 19.03.12, build 48a66213fe
OS (e.g. from /etc/os-release):
Darwin Kernel Version 19.5.0
please see previous discussion.
kind delete cluster does all cleanup including kubeconfig.
kind currently has no concept of a cluster existing. it does have a concept of _nodes_ already existing, which is a problem for cluster creation currently (and is caught and the user notified)
it's intentionally idempotent to simplify cleanup scripts.
what previous discussion 馃檭 (anyway this issue can now serve as a reference)
FWIW current behavior is helpful from kubetest2 perspective since it avoids unneccesary failures in Down() when Up() fails.
/close
intended behavior
@amwat: Closing this issue.
In response to this:
/close
intended behavior
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
i think in the future it might make sense, but right now this would be a breaking change for very small gain