kubernetes: K8S-1.31 || Image Volume Testing with Minikube not working

What happened?

New feature in k8s 1.31 to use an Image Volume With a Pod is not working with ā€œminikube using driver as podman and crio as container runtimeā€.

pod.yaml

apiVersion: v1
kind: Pod
metadata:
  name: image-volume
spec:
  containers:
  - name: shell
    command: ["sleep", "infinity"]
    image: busybox
    volumeMounts:
    - name: volume
      mountPath: /volume
  volumes:
  - name: volume
    image:
      reference: quay.io/crio/alpine:3.9
      pullPolicy: Always

Error: Warning Failed 2s kubelet Error: mount.HostPath is empty

What did you expect to happen?

Should be able to mount OCI image as volume

How can we reproduce it (as minimally and precisely as possible)?

minikube start --feature-gates=ImageVolume=true --driver=podman --nodes 1 --cni calico --cpus=3 --memory=5g --kubernetes-version=v1.31.0 --container-runtime=cri-o --profile crio

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
Client Version: v1.31.0
Kustomize Version: v5.4.2
Server Version: v1.31.0

Cloud provider

minikube

OS version

MAC

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, …) and versions (if applicable)

crio

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (12 by maintainers)

Most upvoted comments

@deepforu47 i’m reading your blogpost, btw I wanted to let you know in your https://github.com/kubernetes/kubernetes/issues/126734#issuecomment-2306774867 you possibly have the following typo:

... [https://linuxhelp4u.blogspot.com/2024/08/kubernetes-131-testing-image-volume.html](url) ...

resulting in clicking the link being directed to https://github.com/kubernetes/kubernetes/issues/url.

I believe you can just paste the URL as md text or update the value in the (url) parenthesis 😃 hope this helps

That CRI-O release-1.31 points to commit d519447937c4711db9ad3e783ab2b8121b39b996 is wrong, I’m going to fix that.

We still need a bit time for the final v1.31.0 in CRI-O, so please be patient šŸ™ƒ

_Edit: The packages in the 1.31 prerelease stream should now have the right content: https://github.com/cri-o/packaging?tab=readme-ov-file#prereleases_

I found this https://github.com/cri-o/cri-o/blob/main/tutorials/crio-in-kind.md which may be useful for those working with kind + crio.

Will wait for the crio version v1.31 to be released and then test using Minikube.

Please let us know once you test.