What would you like to be added:
The ability get better error output in the non-default case when creating a new cluster and not specifying the default kind create cluster.
Why is this needed:
I stumbled around for the better part of a week trying to understand why this didn't work, below. only when I ran it as the default command did it appear to output the error -- it's picking up my docker login and I'd changed the password but had not re-logged in. After logging in properly, it is creating properly.
ββralph at surfacebook in ~/work/go/bin using
β°ββ kind create cluster --image=kindest/node:v1.14.0 --name kindly
Creating cluster "kindly" ...
β Ensuring node image (kindest/node:v1.14.0) πΌ
β Preparing nodes π¦
β Creating kubeadm config π
β Starting control-plane πΉοΈ
Error: failed to create cluster: failed to init node with kubeadm: exit status 1
ββralph at surfacebook in ~/work/go/bin using
β°ββ kind create cluster
Creating cluster "kind" ...
β Ensuring node image (kindest/node:v1.14.2) πΌ
ERRO[17:42:25] Unable to find image 'kindest/node:v1.14.2@sha256:33539d830a6cf20e3e0a75d0c46a4e94730d78c7375435e6b49833d81448c319' locally
ERRO[17:42:25] docker: Error response from daemon: Get https://registry-1.docker.io/v2/kindest/node/manifests/sha256:33539d830a6cf20e3e0a75d0c46a4e94730d78c7375435e6b49833d81448c319: unauthorized: incorrect username or password.
ERRO[17:42:25] See 'docker run --help'.
β Preparing nodes π¦
ERRO[17:42:25] docker run error: exit status 125
Error: failed to create cluster: docker run error: exit status 125
cc @amwat exactly the kind of self-diagnosis I was talking about earlier ^^
xref: #39
/priority important-longterm
@BenTheElder this was why it was failing on my machine at KubeCon. :-)
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
Hit this issue on a debian machine where I didn't have access to the docker socket.
/remove-lifecycle stale
Yep, error handling / reporting / logging is something I'm back at reshaping right now, it's subpar :(
We do at least have a note about the docker socket in the known issues guide now..
/assign
/lifecycle active
I think that @BenTheElder fixed this with the new logging mechanism
Currently, the error that kind shows is meaningful
./kind create cluster
ERROR: failed to list clusters: command "docker ps -q -a --no-trunc --filter label=io.k8s.sigs.kind.cluster=kind --format '{{.Names}}'" failed with error: exec: "docker": executable file not found in $PATH
/close
@aojea: Closing this issue.
In response to this:
I think that @BenTheElder fixed this with the new logging mechanism
Currently, the error that kind shows is meaningful./kind create cluster ERROR: failed to list clusters: command "docker ps -q -a --no-trunc --filter label=io.k8s.sigs.kind.cluster=kind --format '{{.Names}}'" failed with error: exec: "docker": executable file not found in $PATH/close
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.
IMO, as a beginner, this is not beginner-friendly:
$ kind create cluster
ERROR: failed to list clusters: command "docker ps -q -a --no-trunc --filter label=io.x-k8s.kind.cluster=kind --format '{{.Names}}'" failed with error: exit status 1
There should be a hint that Docker is not running
IMO, as a beginner, this is not beginner-friendly:
$ kind create cluster ERROR: failed to list clusters: command "docker ps -q -a --no-trunc --filter label=io.x-k8s.kind.cluster=kind --format '{{.Names}}'" failed with error: exit status 1There should be a hint that Docker is not running
the problem is that it may be caused by another reasons, not just that Docker is not running, so it can be wrong to always return an error saying "Docker is not running"
What aojea said.
Sorry, we know this isn't friendly, there's just a LOT to do and initially we were targeting kubernetes (literally kubernetes itself) developers. There's a lot to do. I have a sketch for more sophisticated help in the command but we've got some deep rework that needs doing to fix e.g. host reboot support first.
I recommend running again with -v 1 on the latest release when you encounter errors until that rework is published.
Most helpful comment
@BenTheElder this was why it was failing on my machine at KubeCon. :-)