You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I enabled the ImageVolume feature gate and attempted to create a pod
using a manifest (adapted from the tutorial example ) with a peculiar twist:
the pod's main container image was empty and the image volume was
(supposed to get) mapped to the container's root (i.e. /, details below).
Pod creation failed with the error:
failed to apply OCI options: failed to mkdir "": mkdir : no such file or directory
For all I know, this could be a wider issue, not specific to kind...
BTW, another surprise (for me, in any case) was that without enabling
the feature gate not only was the image volume not mounted, which I'd
totally understand, but the volume specification seemed to get ignored
silently, without any error -or even warning- to that effect.
What did you expect to happen:
I expected that a pod would get created with its root filesystem
mounted from the image volume, allowing the container to run
despite the fact that the container image was empty.
How to reproduce it (as minimally and precisely as possible):
Create a cluster with the ImageVolume feature gate enabled:
Describe the pod (or monitor events) to find the exact error
$ kubectl describe pod | sed 1,/^Events/d Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 7s default-scheduler Successfully assigned default/image-volume to kind-control-plane Normal Pulled 6s (x2 over 7s) kubelet Container image "debian" already present on machine Normal Pulling 6s (x2 over 7s) kubelet Pulling image "andraxin/empty" Normal Pulled 6s kubelet Successfully pulled image "andraxin/empty" in 876ms (876ms including waiting). Image size: 527 bytes. Warning Failed 6s kubelet Error: failed to generate container "5df9cb15cb246fcfff7e2d31088ecb474eb1efc1951196ff1e2e6933a6fd0be2" spec: failed to apply OCI options: failed to mkdir "": mkdir : no such file or directory Normal Pulled 5s kubelet Successfully pulled image "andraxin/empty" in 877ms (877ms including waiting). Image size: 527 bytes. Warning Failed 5s kubelet Error: failed to generate container "840e2de3a7f0e822295e490aec89c9a3b21f0f4c3d4a1362ded91086bb42dafc" spec: failed to apply OCI options: failed to mkdir "": mkdir : no such file or directory
Anything else we need to know?:
The main container image andraxin/emtpyis, in fact, totally empty.
as it was created by the following one-liner:
echo FROM scratch | docker build -t andraxin/empty -
/remove-kind bug
/kind support
Image Volume isn't available yet, it's an alpha API that requires a CRI implementation that has this feature implemented.
The tutorial states:
The container runtime needs to support the image volumes feature
You need to exec commands in the host
You need to be able to exec into pods
You need to enable the ImageVolume feature gate
Last I checked, only cri-o had image volume support yet.
Note that none of this behavior is specific to kind, and any odd behaviors should be filed as bugs to github.com/kubernetes/kubernetes.
What happened:
I enabled the
ImageVolume
feature gate and attempted to create a podusing a manifest (adapted from the tutorial example ) with a peculiar twist:
the pod's main container image was empty and the image volume was
(supposed to get) mapped to the container's root (i.e.
/
, details below).Pod creation failed with the error:
For all I know, this could be a wider issue, not specific to
kind
...BTW, another surprise (for me, in any case) was that without enabling
the feature gate not only was the image volume not mounted, which I'd
totally understand, but the volume specification seemed to get ignored
silently, without any error -or even warning- to that effect.
What did you expect to happen:
I expected that a pod would get created with its root filesystem
mounted from the image volume, allowing the container to run
despite the fact that the container image was empty.
How to reproduce it (as minimally and precisely as possible):
Create a cluster with the
ImageVolume
feature gate enabled:Apply the manifest to create a pod
Describe the pod (or monitor events) to find the exact error
Anything else we need to know?:
The main container image
andraxin/emtpy
is, in fact, totally empty.as it was created by the following one-liner:
Environment:
kind version: (use
kind version
):kind v0.24.0 go1.23.1 linux/amd64
Runtime info: (use
docker info
,podman info
ornerdctl info
):docker info (click to expand)
OS (e.g. from
/etc/os-release
): GentooKubernetes version: (use
kubectl version
):Any proxies or other special environment settings?: No
The text was updated successfully, but these errors were encountered: