kind
kind copied to clipboard
list all installed images via kind load docker-image
What would you like to be added:
I would like to add a new subcommand like list load-images
that will help us to list all installed docker images via the command kind load docker-image
and this will also help us to check whether the image is loaded successfully or not.
$ kind load docker-image docker.io/librar/alpine:latest
Image: "docker.io/library/alpine:latest" with ID "sha256:021b3423115ff662225e83d7e2606475217de7b55fde83ce3447a54019a77aa2" found to be already present on all nodes.
$ kind list load-images
IMAGE ID
docker.io/library/alpine:latest sha256:021b3423115ff662225e83d7e2606475217de7b55fde83ce3447a54019a77aa2
Why is this needed:
It provides better control over checking whether the image is loaded successfully or not.
cc: @Dentrax
we (w/@Dentrax) are the volunteers for doing this issue btw, we opened an issue to discuss and get ideas from maintainers 🤝🙋🏻♂️
How will you handle the case of multi-node clusters?
I think the idea is OK, but, it needs some thought for things like this.
Also FWIW you can use e.g. kubectl get no -o yaml
to see what images kubernetes lists.
Regarding the labeling approach https://github.com/kubernetes-sigs/kind/pull/2429
- what happens if an image was imported at one point but then later pulled?
Regarding the core concept:
- what is the use case where this is necessary? It seems like the exit code of
kind load docker-image
should tell you if the image was loaded successfully, barring bugs (which we should fix if they exist).
We prefer to add complexity where necessary and keep things very simple otherwise. I'm not sure if this feature is warranted or not.
Appreciate the enthusiasm and contributions in any case! ❤️
Sorry for the delay, I know aojea amwat and myself have been a little less available at the moment.
Also FWIW you can use e.g.
kubectl get no -o yaml
to see what images kubernetes lists.
@developer-guy can you explain why is preferred to use kind commands instead of the kubectl ones?
I don't adding duplicate functionality because it can diverge in the future and will be hard to maintain, is there any case kubectl doesn't cover?
Kindly ping here. 🤞 @developer-guy @BenTheElder
It would be great to get local images before passing it to kind create cluster --image <IMAGE>
command.
$ kind get images
or $ kind list images
would fine:
kindest/node:v1.23.0
kindest/node:v1.22.0
I can pass these to create cluster command eventually.
@Dentrax that's not what this issue was filed about / previously discussing, this was discussing kind load ...
What you are discussing with listing node images sounds like an entirely different feature request, or else a variation on one of the other multiple existing issues about node images #2114 #2376
Oh, confused here, thanks!
- What kind of things should we consider to push forward this PR: https://github.com/kubernetes-sigs/kind/pull/2429
- I found this https://github.com/kubernetes-sigs/kind/pull/1289, but I's closed
- Are there any tracking issue/PR around there?
Really looking forward to both kind list load-images
and kind list kind-images
sub commands. We can ready to give a hand on this. 🙏 @developer-guy
Outstanding questions unanswered for a year+ https://github.com/kubernetes-sigs/kind/pull/2429#issuecomment-905662601, https://github.com/kubernetes-sigs/kind/issues/2425#issuecomment-902793652, https://github.com/kubernetes-sigs/kind/issues/2425#issuecomment-902838732, https://github.com/kubernetes-sigs/kind/issues/2425#issuecomment-906144479
And limited to no demand, so closing for now. Thanks anyhow!
@BenTheElder FYI, for clarity GitHub now allows you to close an issue as not planned rather than completed, so for example it will show up in grey rather than purple in queries.
Thanks.
However given all of the old issues that exist and no reasonable way to change that state on old issues and no "feature" type built in I'm not convinced it's a very meaningful addition / worth the cognitive overhead. To know if a feature was implemented you still have to check the discussion or docs / current usage