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 registry.k8s.io as a containerd registry endpoint. #13878

Closed
wants to merge 1 commit into from

Conversation

ameukam
Copy link
Member

@ameukam ameukam commented Mar 29, 2022

Related:

The Kubernetes project is moving away from k8s.gcr.io to registry.k8s.io

registy.k8s.io is currently redirecting to k8s.gcr.io. Each time
minikube is started using containerd as a runtime, the container images
from k8s.gcr.io will be pulled through registry.k8s.io.

Annonce: https://groups.google.com/g/kubernetes-sig-testing/c/U7b_im9vRrM/m/7qywJeUTBQAJ

Signed-off-by: Arnaud Meukam [email protected]

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 29, 2022
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@ameukam
Copy link
Member Author

ameukam commented Apr 4, 2022

/assign @spowelljr @afbjorklund

@afbjorklund
Copy link
Collaborator

Surely this will be handled by containerd anyway, and fixed when kubeadm changes the URL ?

@@ -103,6 +103,8 @@ oom_score = 0
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["https://registry-1.docker.io"]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."k8s.gcr.io"]
Copy link
Collaborator

@afbjorklund afbjorklund Apr 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default was supposed to be whatever the containerd config defaultspits out

we added it, so that it was easier to see which config was added by minikube

@@ -49,14 +49,14 @@
     startup_delay = "100ms"
   [plugins."io.containerd.grpc.v1.cri"]
     disable_tcp_service = true
-    stream_server_address = "127.0.0.1"
-    stream_server_port = "0"
+    stream_server_address = ""
+    stream_server_port = "10010"
     stream_idle_timeout = "4h0m0s"
     enable_selinux = false
     selinux_category_range = 1024
     sandbox_image = "k8s.gcr.io/pause:3.2"
     stats_collect_period = 10
-    systemd_cgroup = false
+    systemd_cgroup = true
     enable_tls_streaming = false
     max_container_log_line_size = 16384
     disable_cgroup = false

Then of course we forgot to update it after containerd version was upgraded.

But it shouldn't have any non-standard configuration, only upstream default.

@ameukam
Copy link
Member Author

ameukam commented Apr 4, 2022

Surely this will be handled by containerd anyway, and fixed when kubeadm changes the URL ?

* [switch the default kubeadm image registry to registry.k8s.io kubeadm#2671](https://github.com/kubernetes/kubeadm/issues/2671)

It's unclear when containerd will do the switch. Possible it get introduced in 1.7. We want to add a transparent way to use the new endpoint without major impact.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Apr 4, 2022

If the idea is to deprecate "k8s.gcr.io" at some point, then we need solutions for all container runtimes

Similar to how minikube provides image mirrors for people that don't have direct access to GCR at all

      --image-mirror-country string       Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn.
      --image-repository string           Alternative image repository to pull docker images from. This can be used when you have limited access to gcr.io. Set it to "auto" to let minikube decide one for you. For Chinese mainland users, you may use local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers

@afbjorklund
Copy link
Collaborator

afbjorklund commented Apr 4, 2022

Note that most of the minikube traffic goes to storage.googleapis.com

      --preload=true: If set, download tarball of preloaded images if available to improve start time. Defaults to true.

There should be no need to hit the registry, for anything included in k8s

Especially it does not need pulling new images for every new cluster ?

      --cache-images=true: If true, cache docker images for the current bootstrapper and load them into the machine.

These can be cached on the host, and re-used for new clusters without download.

@ameukam
Copy link
Member Author

ameukam commented Apr 4, 2022

Currently registry.k8s.io is a pure redirect to k8s.gcr.io with no modification on the http requests sent by the container runtimes. The same buckets will be hit by any minikube instance. containerd will redirect the request to k8s.gcr.io if registry.k8s.io is inaccessible.

Related:
  - kubernetes/k8s.io#3411

The Kubernetes project is moving away from k8s.gcr.io to registry.k8s.io

registy.k8s.io is currently redirecting to k8s.gcr.io. Each time
minikube is started using containerd as a runtime, the container images
from k8s.gcr.io will be pulled through registry.k8s.io.

Annonce: https://groups.google.com/g/kubernetes-sig-testing/c/U7b_im9vRrM/m/7qywJeUTBQAJ

Signed-off-by: Arnaud Meukam <[email protected]>
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ameukam
To complete the pull request process, please ask for approval from afbjorklund after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 10, 2022
@k8s-ci-robot
Copy link
Contributor

@ameukam: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ameukam
Copy link
Member Author

ameukam commented Jul 19, 2022

will be replaced by containerd/containerd#7038.
/close

@k8s-ci-robot
Copy link
Contributor

@ameukam: Closed this PR.

In response to this:

will be replaced by containerd/containerd#7038.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants