Currently, when kind cluster creation fails, the only feedback users get is the status code. It's really not useful for end users and it's very difficult to troubleshoot cluster creation problems.
Nov 5 22:03:13 INFO Creating kind cluster logger=setup cluster=localdev
Nov 5 22:03:17 ERROR Error starting kind cluster logger=setup err=command "podman run --name localdev-control-plane --hostname localdev-control-plane --label io.x-k8s.kind.role=control-plane --privileged --tmpfs /tmp --tmpfs /run --volume d669c46978e2d99f883685b44964d50e030f36a227fbd4339269455752f99abc:/var:suid,exec,dev --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --net kind --label io.x-k8s.kind.cluster=localdev -e container=podman --cgroupns=private --device /dev/fuse --publish=0.0.0.0:8443:443/tcp --publish=127.0.0.1:40945:6443/tcp -e KUBECONFIG=/etc/kubernetes/admin.conf docker.io/kindest/node:v1.30.3" failed with error: exit status 127: time="2024-11-05T22:03:15Z" level=warning msg="Error validating CNI config file /home/ubuntu/.config/cni/net.d/kind.conflist: [plugin bridge does not support config version \"1.0.0\" plugin portmap does not support config version \"1.0.0\" plugin firewall does not support config version \"1.0.0\" plugin tuning does not support config version \"1.0.0\"]"
time="2024-11-05T22:03:15Z" level=warning msg="Error validating CNI config file /home/ubuntu/.config/cni/net.d/kind.conflist: [plugin bridge does not support config version \"1.0.0\" plugin portmap does not support config version \"1.0.0\" plugin firewall does not support config version \"1.0.0\" plugin tuning does not support config version \"1.0.0\"]"
time="2024-11-05T22:03:15Z" level=error msg="error loading cached network config: network \"kind\" not found in CNI cache"
time="2024-11-05T22:03:15Z" level=warning msg="falling back to loading from existing plugins on disk"
time="2024-11-05T22:03:15Z" level=warning msg="Error validating CNI config file /home/ubuntu/.config/cni/net.d/kind.conflist: [plugin bridge does not support config version \"1.0.0\" plugin portmap does not support config version \"1.0.0\" plugin firewall does not support config version \"1.0.0\" plugin tuning does not support config version \"1.0.0\"]"
time="2024-11-05T22:03:15Z" level=error msg="Error tearing down partially created network namespace for container 552c1c3662ab3daf02cdec6c152de0552267e140e433c43cf62065f416f1d810: CNI network \"kind\" not found"
Error: error configuring network namespace for container 552c1c3662ab3daf02cdec6c152de0552267e140e433c43cf62065f416f1d810: CNI network "kind" not found
In addition, this PR makes kind output available in debug logs:
Nov 5 22:03:06 INFO Creating kind cluster logger=setup cluster=localdev
Nov 5 22:03:06 DEBUG+3 Creating cluster "localdev" ...
logger=setup
Nov 5 22:03:06 DEBUG+3 • Ensuring node image (kindest/node:v1.30.3) 🖼 ...
logger=setup
Nov 5 22:03:06 DEBUG+2 Image: docker.io/kindest/node:v1.30.3 present locally logger=setup
Nov 5 22:03:07 DEBUG+3 ✓ Ensuring node image (kindest/node:v1.30.3) 🖼
logger=setup
Nov 5 22:03:07 DEBUG+3 • Preparing nodes 📦 ...
logger=setup
Nov 5 22:03:09 DEBUG+3 ✗ Preparing nodes 📦
Currently, when kind cluster creation fails, the only feedback users get is the status code. It's really not useful for end users and it's very difficult to troubleshoot cluster creation problems.
This PR ensures we log kind errors.
Current:
With this PR:
In addition, this PR makes kind output available in debug logs:
fixes: https://github.com/cnoe-io/idpbuilder/issues/432 fixes: #357