Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add repo prefix to cache images, to not confuse containerd/crio #9131

Closed
afbjorklund opened this issue Aug 31, 2020 · 1 comment · Fixed by #9536
Closed

Add repo prefix to cache images, to not confuse containerd/crio #9131

afbjorklund opened this issue Aug 31, 2020 · 1 comment · Fixed by #9536
Labels
co/runtime/containerd co/runtime/crio CRIO related issues kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@afbjorklund
Copy link
Collaborator

In the list of bootstrapper images to cache, some do not have their repo added:

k8s.gcr.io/kube-proxy:v1.18.3
k8s.gcr.io/kube-scheduler:v1.18.3
k8s.gcr.io/kube-controller-manager:v1.18.3
k8s.gcr.io/kube-apiserver:v1.18.3
k8s.gcr.io/coredns:1.6.7
k8s.gcr.io/etcd:3.4.3-0
k8s.gcr.io/pause:3.2
gcr.io/k8s-minikube/storage-provisioner:v2
kubernetesui/dashboard:v2.0.1
kubernetesui/metrics-scraper:v1.0.4

This confuses podman (loading for crio), which tries to add a "localhost/" prefix to it.

$ sudo crictl images
IMAGE                                     TAG                 IMAGE ID            SIZE
gcr.io/k8s-minikube/storage-provisioner   v2                  ac5e2ed5acc50       31.6MB
k8s.gcr.io/coredns                        1.6.7               67da37a9a360e       43.9MB
k8s.gcr.io/etcd                           3.4.3-0             303ce5db0e90d       290MB
k8s.gcr.io/kube-apiserver                 v1.18.3             7e28efa976bd1       175MB
k8s.gcr.io/kube-controller-manager        v1.18.3             da26705ccb4b5       164MB
k8s.gcr.io/kube-proxy                     v1.18.3             3439b7546f29b       119MB
k8s.gcr.io/kube-scheduler                 v1.18.3             76216c34ed0c7       96.8MB
k8s.gcr.io/pause                          3.2                 80d28bedfe5de       686kB
localhost/kubernetesui/dashboard          v2.0.1              85d666cddd043       226MB
localhost/kubernetesui/metrics-scraper    v1.0.4              86262685d9abb       36.9MB

This is only when not using the preload, since using "pull" does add the repo prefix.

Currently we hack around the issue, by adding "docker.io" to images after the fact...
But they are still stored with the relative path name, in for instance the image cache.

So it would be best to use the proper names, since docker doesn't care either way:

$ docker pull kubernetesui/dashboard:v2.0.1
v2.0.1: Pulling from kubernetesui/dashboard
Digest: sha256:a705c04e83badb4fdb2b95eb6b126f3c2759677b2f953742f3b08a1fada07d9d
Status: Image is up to date for kubernetesui/dashboard:v2.0.1
docker.io/kubernetesui/dashboard:v2.0.1
$ docker pull docker.io/kubernetesui/dashboard:v2.0.1
v2.0.1: Pulling from kubernetesui/dashboard
Digest: sha256:a705c04e83badb4fdb2b95eb6b126f3c2759677b2f953742f3b08a1fada07d9d
Status: Image is up to date for kubernetesui/dashboard:v2.0.1
docker.io/kubernetesui/dashboard:v2.0.1

But it does make a difference for container runtimes without a hardcoded registry...

Would be nice to avoid it, to support using local images (without adding localhost/)
Currently there is a problem, that CRI is not able to find images in the cache: #8554

And we don't want to involve the kubernetes dashboard and metrics-scraper in that.

IMAGE                                     TAG                 IMAGE ID            SIZE
docker.io/kubernetesui/dashboard          v2.0.1              85d666cddd043       226MB
localhost/kubernetesui/dashboard          v2.0.1              85d666cddd043       226MB
docker.io/kubernetesui/metrics-scraper    v1.0.4              86262685d9abb       36.9MB
localhost/kubernetesui/metrics-scraper    v1.0.4              86262685d9abb       36.9MB

@afbjorklund afbjorklund added kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. co/runtime/crio CRIO related issues co/runtime/containerd labels Aug 31, 2020
@afbjorklund afbjorklund changed the title Add repo tag to cache images, to not confuse containerd/crio Add repo prefix to cache images, to not confuse containerd/crio Aug 31, 2020
@tstromberg
Copy link
Contributor

SGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/runtime/containerd co/runtime/crio CRIO related issues kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants