vmware-archive / buildkit-cli-for-kubectl

BuildKit CLI for kubectl is a tool for building container images with your Kubernetes cluster
Other
499 stars 41 forks source link

Kubernetes node requirements should be clearly documented in the install/usage directions (and configurable where possible) #133

Open spkane opened 2 years ago

spkane commented 2 years ago

What steps did you take and what happened I was trying to use this against a colima-based environment, which is essentially a VM running k3s for macOS. My setup is using contained versus docker.

When I run kubectl build . I see errors like this:

 => => # Warning buildkit-5ccb4cf857-n5fsx Failed Error: failed to generate container "f61e0f583462c6533a262e462577aff3bf4accff4b3
 => => # 71cf9d54364a2042a14e4" spec: failed to generate spec: path "/tmp" is mounted on "/tmp" but it is not a shared mount

I was able to fix this by connecting to the VM with colima ssh and running this:

sudo mount --make-shared / # for /var/log
sudo mount --make-shared /tmp
sudo mount --make-shared /run
sudo mount --make-shared /var/lib
exit

And then on my local system I ran:

kubectl delete deployment buildkit
kubectl build .

and things worked fine.

It seems that settings that are required on the node should be well documented, and as mentioned in https://github.com/vmware-tanzu/buildkit-cli-for-kubectl/issues/107 it would be great if some things could be configured, like what directories to mount, and where the sockets, etc are located on the nodes.

What did you expect to happen

I expected kubectl build . to work with a basic test.

Environment Details:

I ended up building the plugin while I was doing my testing.

Client:  v0.1.5-8-g5db0221
Builder: no builder pods are running
Client Version: v1.24.0
Kustomize Version: v4.5.4
Server Version: v1.22.4+k3s1

k3s

Client:
  Version:  v1.5.8
  Revision: 1e5ef943eb76627a6d3b6de8cd1ef6537f393a71
  Go version: go1.16.10

Server:
  Version:  v1.5.8
  Revision: 1e5ef943eb76627a6d3b6de8cd1ef6537f393a71
  UUID: 7dd40f00-e6f7-4b53-8d7a-8e21fdb6ea6c

Builder Logs [If applicable, an excerpt from kubectl logs -l app=buildkit from around the time you hit the failure may be very helpful]

Error from server (BadRequest): container "buildkitd" in pod "buildkit-5ccb4cf857-n5fsx" is waiting to start: CreateContainerError

Vote on this request

This is an invitation to the community to vote on issues. Use the "smiley face" up to the right of this comment to vote.