buildx icon indicating copy to clipboard operation
buildx copied to clipboard

Unable to specify requests/limits on CPU/memory for kubernetes driver (`error: no valid drivers found: invalid driver option limits.cpu for driver kubernetes`)

Open gboer opened this issue 3 years ago • 2 comments

Hello, we're trying to create a buildx builder in Kubernetes using the following command: docker buildx create --name kubernetes-buildx-builder --driver kubernetes --driver-opt replicas=3,namespace=docker-buildx,loadbalance=sticky,limits.cpu=4,requests.cpu=4,limits.memory=4G,requests.memory=4G --use kubernetes-buildx-builder

However, when we do that, we can see the following error when we run the docker buildx bake command: error: no valid drivers found: invalid driver option limits.cpu for driver kubernetes

We have tried pretty much all we could think of, changing G to Gi, removing the memory limits/requests, removing limits.cpu, but no matter what we do, it will always say that there is a problem with one of the 4 parameters specified for the requests/limits.

There must be something that we're missing here, but we're out of ideas. Does anyone here have an idea why this happens? Or maybe an example of a command that does work?

gboer avatar Mar 02 '22 14:03 gboer

Please make sure your buildx is >= 0.6.0

https://github.com/docker/buildx/commit/a53e392afbb55d0a0c7853c6e9d7fcc7b350f933

AkihiroSuda avatar Mar 08 '22 05:03 AkihiroSuda

@AkihiroSuda , thanks for your answer! I'm running the following version: v0.7.1 05846896d149da05f3d6fd1e7770da187b52a247. So I don't think it's the version that's wrong?

gboer avatar Mar 08 '22 10:03 gboer