What would you like to be documented:
How to uninstall.
Why is this needed:
Because I did a brew uninstall kind and I've still got clusters laying around when I restart my Docker engine.
Fixed it:
HOMEBREW_NO_AUTO_UPDATE=1 brew install kind && \
kind delete cluster --name local && \
brew uninstall kind
Not sure if Homebrew supports hooks or whatever but it'd be nice to do some clean-up on uninstall. Also, as a passing observation, the CLI syntax of using --name flag to access clusters feels a little wonky. Would've preferred just entering the cluster name without the need to specify name when deleting a cluster, e.g. kind delete cluster local.
you can use normal docker cleanup tools (e.g. delete containers) or the more convenient ~ kind delete clusters --all && docker network rm kind
Also, as a passing observation, the CLI syntax of using --name flag to access clusters feels a little wonky. Would've preferred just entering the cluster name without the need to specify name when deleting a cluster, e.g. kind delete cluster local.
I agree, but it's even wonkier to retrofit later. The pattern comes from kubectl --namespace, minikube --profile, etc.
Allowing other commands like kind load docker-image to default the name while also allowing specifying it is easier with the --name flag versus an argument (how would that work??).
FWIW we also support setting KIND_CLUSTER_NAME currently instead if you just want to specify a cluster once and use it with many commands.
It's all good. I find the kubectl -n syntax a little wonky too. But I'm sure it's there for a reason. 馃樃
er, and:
Not sure if Homebrew supports hooks or whatever but it'd be nice to do some clean-up on uninstall.
@cblecker contributed the homebrew packaging (hi christoph! thanks again!), I'm not super familiar with this either, or how idiomatic that would be in homebrew.
That said, it's not too different to cleanup from other tools using docker, usually you'd do e.g. docker compose up ... docker compose down, I sort of doubt uninstalling e.g. compose tears down all running environments. And as mentioned you don't actually need kind installed to clean up after it at this time.
The only other thing left behind currently is kubeconfig files, where the user specified, or at the kubernetes default location (~/.kube/config). This file may contain details for other clusters and leaving kind info in it is relatively harmless. kind delete cluster does clean up after kind here though.
In the future we might create say a $HOME/.kind or something like that, in which case we'd ship something like kind reset and document all of that.
Most helpful comment
you can use normal docker cleanup tools (e.g. delete containers) or the more convenient ~
kind delete clusters --all && docker network rm kind