How can I remove an image from minikube?

Viewed 4221
$ minikube image ls
...
docker.io/library/crasher:latest
...

$ minikube image rm crasher crasher:latest docker.io/library/crasher:latest

$ minikube image ls
...
docker.io/library/crasher:latest
...

It looks like minikube rm doesn't remove the image from minikubes internal cache. I would like to be able to remove one of these images so that I can be sure I when I minikube image load that it picks up the new image.

2 Answers

I figured it out, the problem was that I still had services running that were using the image.

You either cant delete an in use image, or minikube is adding the in use image back into the list faster than I can run commands.

So if you want to do a local hotswap of your image on minikube, you need to:

1. kubectl delete
2. minikube image rm
3. minikube image load
4. kubectl apply

To delete image from Kubernetes :

 minikube image rm  your-image-name

To load local image to Kubernetes :

minikube image load your-image-name
Related