feat: bundle k3d binary + explicit kubeconfig merge for --cluster=k3d - #454
feat: bundle k3d binary + explicit kubeconfig merge for --cluster=k3d#454szhekpisov-katanox wants to merge 3 commits into
Conversation
k3d's end-of-create kubeconfig merge is best-effort: if it fails, k3d logs a warning and still exits 0, and we discard its output on success. The tool then dies later with 'No kubeconfig file found' and no clue why. Run 'k3d kubeconfig merge --kubeconfig-merge-default' explicitly after create so a failed merge surfaces its actual error, and log the create output at debug level.
|
Hi @szhekpisov-katanox Before deciding whether we should add k3d to the image, I would like to understand the motivation a bit better. Why would you prefer using k3d inside the container instead of The current behavior is actually intentional. The published container image only ships with |
|
Hi @dag-andersen, k3d takes less time to spin up, has smaller binary size and consumes less resources due to it's architecture. Hence the intention to use it instead of kind. Just did a parallel run on the same PR, results are on the screenshot. |
@szhekpisov-katanox That is interesting! vs. So Would you mind testing if locally from your machine? |
|
Hi @dag-andersen , Thank you for provided commands. With them and 0 agents I was able to achieve median 1m46s for k3d and 1m23s for kind (7 local runs). With that I can conclude that kind is faster indeed. I'll run more performance tests on GitHub Actions to understand, why runs there are different, and will let you know about results. |
@szhekpisov-katanox Thank you! sounds good 🚀 |
|
Hi @dag-andersen , I did additional benchmarks, and |

Two changes that make the existing
--cluster=k3doption work reliably in the published image:k3dbinary in the image. The image shippedkindbut notk3d, so--cluster=k3dfailed out of the box. Adds thek3dbinary alongsidekindin the Dockerfile.k3d cluster create. k3d's end-of-create kubeconfig merge is best-effort: on failure it only logs a warning and still exits 0, and its output was discarded. The tool then died later with a crypticNo kubeconfig file found. Runningk3d kubeconfig merge --kubeconfig-merge-defaultexplicitly surfaces the real error at the point of failure.Split out of #452 per review.