Replies: 1 comment 5 replies
-
https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy Images are not "pulled from the local container runtime". The container runtime is the thing that pulls it if it is necessary, from a remote registry. There is nowhere other than the runtime for the image to go. If you're manually loading the image into the runtimes image store and want to skip pulling, then you need to say so. Having it already on the node doesn't help if you don't set your image pull policy correctly in the pod spec. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am encountering an issue when trying to pull a container image in an
rke2
cluster using the following example:ghcr.io/cloudnative-pg/cloudnative-pg:1.24.1
. Despite following these steps, the image does not seem to be pulled successfully:Pull the image locally:
docker pull ghcr.io/cloudnative-pg/cloudnative-pg:1.24.1
Save the image as a tar file:
docker save -o cloudnative-pg-1.24.1.tar ghcr.io/cloudnative-pg/cloudnative-pg:1.24.1
Import the image into the container runtime:
ctr -n k8s.io images import cloudnative-pg-1.24.1.tar
Tag the image for local use:
ctr -n k8s.io images tag ghcr.io/cloudnative-pg/cloudnative-pg:1.24.1 cloudnative-pg:1.24.1
Remove the original image reference (optional):
ctr -n k8s.io images rm ghcr.io/cloudnative-pg/cloudnative-pg:1.24.1
Verify the imported image:
However, when I check the pod status using
kubectl
, the image fails to load properly, and I encounter anErrImagePull
error:Observations:
cloudnative-pg:1.24.1
is successfully imported and tagged within thek8s.io
namespace of the container runtime (confirmed viactr -n k8s.io images list
).docker.io/library/cloudnative-pg:1.24.1
, which fails due to the repository not existing or requiring authorization.Question:
What am I missing in this process? Why is the image not being pulled from the local container runtime despite being imported and tagged correctly? Is there an additional configuration step required to make the image available to the
rke2
cluster?Beta Was this translation helpful? Give feedback.
All reactions