buildkit-cli-for-kubectl icon indicating copy to clipboard operation
buildkit-cli-for-kubectl copied to clipboard

Differences between "kubectl build" and "docker buildx build"?

Open jpetazzo opened this issue 4 years ago • 1 comments

Hi!

First of all, I'm glad to see that you're still busy making cool stuff in the container space 😊

I stumbled upon kubectl-build thanks to its Tilt plugin, and I've been playing with it a bit for my Kubernetes workshops (specifically to enable a "100% Kubernetes" scenario where we wouldn't necessarily rely on Docker to build images, since it may or may not be available on our clusters).

After playing a bit with it, I wonder - is there a fundamental difference between using kubectl build, and using docker buildx build (after doing docker buildx create --driver=kubernetes --use, of course)? Is it kind of the same (but with some extra bells and whistles, like the automatic setup of the builder, the use of a registry secret, maybe more...) or is there something fundamentally different between the two?

Thank you! ♥

(PS sorry for the initially blank message; I fat-fingered my keyboard😅)

jpetazzo avatar Dec 10 '21 13:12 jpetazzo

This project began life as a fork of buildx refactored as a kubectl CLI plugin. We had considered trying to keep the codebase aligned to be able to flow fixes/features back and forth, but as we refactored the code, this ultimately didn't look like the optimal path. Ultimately, I'd think of this as a kubectl based BuildKit client. One of the key goals to call out is making sure images are available in the local container runtime without requiring a registry. Over time we'd like to continue to enhance the capabilities for developers wanting to build images within k8s.

dhiltgen avatar Dec 14 '21 22:12 dhiltgen