kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.16k stars 4.87k forks source link

Minikube (1.32.0) fails to load any image with: minikube image load #18021

Open jpconver opened 7 months ago

jpconver commented 7 months ago

What Happened?

Hi!

I've just updated Minikube and I'm not able to load images, even the official images (ie. Ubuntu 22.04)

Environment Info

Docker version 25.0.0, build e758fe5 minikube version: v1.32.0 commit: 8220a6eb95f0a4d75f7f2d7b14cef975f050512

Steps to reproduce it

  1. Install Minikube minikube start --memory 8192 --cpus 6 --driver=docker

  2. Load image: minikube image load ubuntu:22.04

After the execution of the last command the following error appears:

❌ Exiting due to GUEST_IMAGE_LOAD: Failed to load image: save to dir: caching images: caching image "/home/jpconver/.minikube/cache/images/amd64/ubuntu_22.04": write: unable to calculate manifest: blob sha256:84041ef6c694bef320154facfaf9fc00a97bd4258cd48fb3e4feb8968f427acb not found

Note: I have downloaded the image before in my local docker images:

$ docker image ls
REPOSITORY            TAG        IMAGE ID          CREATED        SIZE
ubuntu                22.0       e34e831650c1      11 days ago    77.9MB

Attach the log file

logs.txt logs2.txt

Operating System

Ubuntu

Driver

Docker

lb7 commented 7 months ago

I believe this is an issue in Docker 25 which just released on 1/19. My team ran into this as well and downgrading to Docker 24 has worked to resolve this issue for us.

You can install the specific version by following the "specific version" steps on this page https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

jpconver commented 7 months ago

I believe this is an issue in Docker 25 which just released on 1/19. My team ran into this as well and downgrading to Docker 24 has worked to resolve this issue for us.

You can install the specific version by following the "specific version" steps on this page https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

Thanks a lot, you've saved my day!! I installed docker version 24 and now is working like a charm!!

MrBr-github commented 7 months ago

Same here, roll back to docker 24 resolved the issue @lb7 thanks a lot

trolleycrash commented 7 months ago

Confirmed working. Saved my day!

AkihiroSuda commented 7 months ago

This is an issue of go-containerregistry:

maksymilian-mulawa-form3 commented 7 months ago

minikube has now updated to v0.19.0 for go-containerregistry. Building minikube from source (prior future v1.33.0 release which will probably include the fix) solved the problem for me on Docker 25.0.1.

Running below build command on macos (M1) produced minikube binary to ./out/minikube-darwin-arm64.

make minikube-darwin-arm64
medyagh commented 7 months ago

this fix would be included in the next minikube version

imilchev commented 6 months ago

what's the status on the releases though? we haven't seen any new releases since end of November

HGZahn commented 6 months ago

As a workaround for getting local images into minikube you can use:

  1. eval $(minikube docker-env) or eval $(minikube podman-env)
    1. docker build -t my_image . or podman-remote build -t my_image .

(enter both commands in the same terminal window)

This is described in the minikube docs and will rebuild the image within minikube.

lentzi90 commented 6 months ago

If you already have the image you can just do

docker image save -o image.tar my_image:tag
minikube image load image.tar
boratanrikulu commented 5 months ago

If anyone using archlinux is experiencing this issue, you can downgrade your Docker package as follows;

  1. Go to https://archive.archlinux.org/packages/d/docker/
  2. Download latest 1.24 package, for example this one https://archive.archlinux.org/packages/d/docker/docker-1%3A24.0.7-1-x86_64.pkg.tar.zst
  3. Run this command sudo pacman -U <filename>
humelse commented 5 months ago

If you already have the image you can just do

docker image save -o image.tar my_image:tag
minikube image load image.tar

This works for me. Thanks

medyagh commented 5 months ago

the minikube 1.33.0 beta is out and should be fixing this issue, if you like please give it a try https://minikube.sigs.k8s.io/docs/start/

pratikparshetti commented 5 months ago

If you already have the image you can just do

docker image save -o image.tar my_image:tag
minikube image load image.tar

I'm facing issues while enabling ingress addons, and I suspect that its because I'm not able to pull the image from registry as I got the warning - "This container is having trouble accessing https://registry.k8s.io/" when I run minikube start. So I manually pulled the images but added those as well as per your commands but still it did not work.

I had a question - In my case I had used the command as docker image save -o image.tar registry.k8s.io/ingress-nginx/controller:v1.9.4 minikube image load image.tar

which loaded the image I assume as I did not got any error. But when I run the command of enabling ingress addons it tried to pull registry.k8s.io/ingress-nginx/controller:v1.9.4 image but how minikube will come to know that this image is nothing but image.tar which is already loaded?

rayrapetyan commented 5 months ago

the minikube 1.33.0 beta is out and should be fixing this issue, if you like please give it a try https://minikube.sigs.k8s.io/docs/start/

Initially, it seems to be working fine in version 1.33.0, but it doesn't behave as expected. Basically, the 'image load' works fine the first time, but if there are same images being used in the cluster, further attempts fail without any warning (see https://github.com/kubernetes/minikube/issues/16032)

k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten