cri-tools: crictl images can not find local image loaded by podman
Just take a look at the following commands and the result:
# podman images localhost/vanlos/vanlos-builder:latest
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/vanlos/vanlos-builder latest efe2b0dfd8b8 6 days ago 601 MB
# podman images vanlos/vanlos-builder:latest
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/vanlos/vanlos-builder latest efe2b0dfd8b8 6 days ago 601 MB
# crictl images localhost/vanlos/vanlos-builder:latest
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/vanlos/vanlos-builder latest efe2b0dfd8b8 6 days ago 601 MB
# crictl images vanlos/vanlos-builder:latest
IMAGE TAG IMAGE ID SIZE
crictl images will not find local image without the prefix of ‘localhost/’, then it will make k8s always try to pull image to start a pod, but the image is locally.
My OS is CentOS 7.5, and cri utils infomations are as following:
# crictl version
Version: 0.1.0
RuntimeName: cri-o
RuntimeVersion: 1.11.10
RuntimeApiVersion: v1alpha1
# rpm -qa | grep cri-tools
cri-tools-1.11.1-1.rhaos3.11.gitedabfb5.el7.x86_64.rpm
# rpm -qa | grep cri-o
cri-o-1.11.10-1.rhaos3.11.git42c86f0.el7.x86_64.rpm
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (7 by maintainers)
Yep you have to run podman as root, otherwise it will choose the local storage 😃
Awesome! 👍
And here you get “Sascha’s tip of the day”: You can load the image via
too! 😇
@vanloswang, I suspect that
cri-o
andpodman
are configured to use different directories for storing images. You can check that in the corresponding configs (i.e.,/etc/crio/crio.conf
and/etc/containers/storage.conf
). It’s also important to executepodman
as root since rootless images are stored somewhere else.