2 min read | by Jordi Prats
Running applications on minikube is a great test bed, but it can get messy pretty easily. That's specially true if there are several people messing with it.
It might be useful to retrieve all the images we are using to run the services. For this we can either describe all the Pods on all the Namespaces or check that the minikube image ls command
Using this command we can get the list of images it has retrieved to run the cluster:
$ minikube image ls k8s.gcr.io/pause:3.5 k8s.gcr.io/kube-scheduler:v1.22.3 k8s.gcr.io/kube-proxy:v1.22.3 k8s.gcr.io/kube-controller-manager:v1.22.3 k8s.gcr.io/kube-apiserver:v1.22.3 k8s.gcr.io/etcd:3.5.0-0 k8s.gcr.io/coredns/coredns:v1.8.4 gcr.io/k8s-minikube/storage-provisioner:v5 docker.io/library/image:latest docker.io/library/busybox:latest docker.io/library/alpine:latest docker.io/kubernetesui/metrics-scraper:v1.0.7 docker.io/kubernetesui/dashboard:v2.3.1
For example, if we create a new Pod like this:
$ kubectl run test --image jordiprats/flask-pet2cattle:4.18 -- sleep 5 pod/test created $ kubectl get pods NAME READY STATUS RESTARTS AGE test 0/1 Running 2 (21s ago) 2m
As soon as it is running we are going to be able the image it is using on the list:
$ minikube image ls k8s.gcr.io/pause:3.5 k8s.gcr.io/kube-scheduler:v1.22.3 k8s.gcr.io/kube-proxy:v1.22.3 k8s.gcr.io/kube-controller-manager:v1.22.3 k8s.gcr.io/kube-apiserver:v1.22.3 k8s.gcr.io/etcd:3.5.0-0 k8s.gcr.io/coredns/coredns:v1.8.4 gcr.io/k8s-minikube/storage-provisioner:v5 docker.io/library/image:latest docker.io/library/busybox:latest docker.io/library/alpine:latest docker.io/kubernetesui/metrics-scraper:v1.0.7 docker.io/kubernetesui/dashboard:v2.3.1 docker.io/jordiprats/flask-pet2cattle:4.18
Posted on 17/03/2022