kind
kind copied to clipboard
Add `start` and `stop` command to `kind`.
What would you like to be added:
Add a start and stop command to kind.
This would be a light abstraction on docker kill or docker stop and docker start. It would also do some validation that start/stop is supported for the cluster (e.g. is it multi-node? etc).
note, I've not considered podman support, but imagine this could be possible
Why is this needed:
For the sake of local resources, I sometimes use docker kill to turn down running (single-node) kind clusters and docker start to bring them back up. It could be nice to do this entirely through kind.
Curious if the kind project would be interested in a contribution around this functionality! No worries if not, thanks for your consideration :smile:!
For the sake of local resources, I sometimes use docker kill to turn down running (single-node) kind clusters and docker start to bring them back up. It could be nice to do this entirely through kind.
Are you sure this is working properly? What host environment?
IIRC in the past we did not do this because it didn't actually work correctly. That may not be true today due to various fixes ...
IIRC it works for single node, but it will fail for multi-node if the runtime assign different IPs to the node
We did have some attempts before, but unfortunately not all problems were solved in the end, more details can refer to #408 and #484
seems like this is on the backlog until #1689 is fixed
In case it's interesting we solved this in our fork of KinD for single node clusters by letting Docker assign a stable IP address and then using it to prevent issues with IP address changes. (https://github.com/getoutreach/kind/pull/4 and https://github.com/getoutreach/kind/pull/5)
It's not perfect but it works.
One of these days I want to pitch the few changes we made in PRs here, but just haven't gotten to It so hopefully some of that code is useful for anyone wanting to implement a start/stop until it's done here.
Thanks for sharing!
One of these days I want to pitch the few changes we made in PRs here, but just haven't gotten to It so hopefully some of that code is useful for anyone wanting to implement a start/stop until it's done here.
If you do, please see our contributing guide https://kind.sigs.k8s.io/docs/contributing/getting-started/ In particular we'd prefer to discuss approach in detail before moving to feature PRs.
Also FWIW there's promising alternatives in #2671 (though, that reallly should have been discussed more up front as well, and probably same thing for the changes being PRed to kubeadm).