Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

creating a builder instance in k0s does not seem to work #134

Open
rgl opened this issue Jun 13, 2022 · 0 comments
Open

creating a builder instance in k0s does not seem to work #134

rgl opened this issue Jun 13, 2022 · 0 comments

Comments

@rgl
Copy link

rgl commented Jun 13, 2022

What steps did you take and what happened

I'm trying this project with k0s v1.23.6+k0s.2, but it fails to mount various containerd directories:

root@awx:~# kubectl-buildkit create \
>     --progress=plain \
>     --worker=containerd \
>     --containerd-sock=/var/run/k0s/containerd.sock \
>     --containerd-namespace=k8s.io
#1 [internal] booting buildkit
#1 waiting for 1 pods to be ready for buildkit
#1 0.040 Normal 	buildkit-75bb679db9 	SuccessfulCreate 	Created pod: buildkit-75bb679db9-gswgp
#1 0.058 Normal 	buildkit-75bb679db9-gswgp 	Scheduled 	Successfully assigned default/buildkit-75bb679db9-gswgp to awx
#1 0.058 Warning 	buildkit-75bb679db9-gswgp 	FailedMount 	MountVolume.SetUp failed for volume "var-lib-containerd" : hostPath type check failed: /var/lib/containerd is not a directory
#1 0.058 Warning 	buildkit-75bb679db9-gswgp 	FailedMount 	Unable to attach or mount volumes: unmounted volumes=[var-lib-containerd], unattached volumes=[var-lib-containerd run-containerd var-log tmp kube-api-access-hxll9 buildkitd-config containerd-sock var-lib-buildkit]: timed out waiting for the condition
#1 0.058 Warning 	buildkit-75bb679db9-gswgp 	FailedMount 	Unable to attach or mount volumes: unmounted volumes=[var-lib-containerd], unattached volumes=[run-containerd var-log tmp kube-api-access-hxll9 buildkitd-config containerd-sock var-lib-buildkit var-lib-containerd]: timed out waiting for the condition

Any idea what is might be wrong? Or how to make it work?

FWIW, The usage/test of k0s was introduced in #44 by @adamparco and @dhiltgen merged the changes.

This might be because k0s launches containerd with non-default directories:

/var/lib/k0s/bin/containerd \
    --root=/var/lib/k0s/containerd \
    --state=/var/lib/k0s/run/containerd \
    --address=/var/lib/k0s/run/containerd.sock \
    --config=/etc/k0s/containerd.toml

And because there is only kubectl-buildkit arguments to set --containerd-sock=/var/run/k0s/containerd.sock?

What did you expect to happen

To use this project in a k0s k8s cluster.

Environment Details:

  • kubectl buildkit version: 0.1.5
  • Kubernetes version: 1.23.6
  • Where are you running kubernetes: KVM VM
  • Container Runtime and version: containerd 1.5.11

Builder Logs

There are no logs because the builder was not even started:

root@awx:~# kubectl logs -l app=buildkit
No resources found in default namespace.

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.

  • 👍 "I would like to see this bug fixed as soon as possible"
  • 👎 "There are more important bugs to focus on right now"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant