Skip to content

Commit a01b890

Browse files
authored
Merge pull request #39914 from thockin/reorder-registry-blog-sections
Reorder registry blog sections
2 parents 381a4a5 + 4195de4 commit a01b890

File tree

1 file changed

+61
-64
lines changed

1 file changed

+61
-64
lines changed

content/en/blog/_posts/2023-03-10-image-registry-change.md

Lines changed: 61 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -33,83 +33,24 @@ registry](https://kubernetes.io/blog/2022/11/28/registry-k8s-io-faster-cheaper-g
3333

3434
If you think you may be impacted, or would like to know more about this change, please keep reading.
3535

36-
## Why did Kubernetes change to a different image registry?
37-
38-
k8s.gcr.io is hosted on a custom [Google Container Registry
39-
(GCR)](https://cloud.google.com/container-registry) domain that was set up solely for the Kubernetes
40-
project. This has worked well since the inception of the project, and we thank Google for providing
41-
these resources, but today, there are other cloud providers and vendors that would like to host
42-
images to provide a better experience for the people on their platforms. In addition to Google’s
43-
[renewed commitment to donate $3
44-
million](https://www.cncf.io/google-cloud-recommits-3m-to-kubernetes/) to support the project's
45-
infrastructure last year, Amazon Web Services announced a matching donation [during their Kubecon NA
46-
2022 keynote in Detroit](https://youtu.be/PPdimejomWo?t=236). This will provide a better experience
47-
for users (closer servers = faster downloads) and will reduce the egress bandwidth and costs from
48-
GCR at the same time.
49-
50-
For more details on this change, check out [registry.k8s.io: faster, cheaper and Generally Available
51-
(GA)](/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/).
52-
53-
## Why is a redirect being put in place?
54-
55-
The project switched to [registry.k8s.io last year with the 1.25
56-
release](https://kubernetes.io/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/); however, most of
57-
the image pull traffic is still directed at the old endpoint k8s.gcr.io. This has not been
58-
sustainable for us as a project, as it is not utilizing the resources that have been donated to the
59-
project from other providers, and we are in the danger of running out of funds due to the cost of
60-
serving this traffic.
61-
62-
A redirect will enable the project to take advantage of these new resources, significantly reducing
63-
our egress bandwidth costs. We only expect this change to impact a small subset of users running in
64-
restricted environments or using very old clients that do not respect redirects properly.
65-
66-
## What images will be impacted?
67-
68-
**ALL** images on k8s.gcr.io will be impacted by this change. k8s.gcr.io hosts many images beyond
69-
Kubernetes releases. A large number of Kubernetes subprojects host their images there as well. Some
70-
examples include the `dns/k8s-dns-node-cache`, `ingress-nginx/controller`, and
71-
`node-problem-detector/node-problem-detector` images.
72-
73-
## What will happen to k8s.gcr.io?
74-
75-
Separate from the the redirect, k8s.gcr.io will be frozen [and will not be updated with new images
76-
after April 3rd, 2023](https://kubernetes.io/blog/2023/02/06/k8s-gcr-io-freeze-announcement/). `k8s.gcr.io`
77-
will not get any new releases, patches, or security updates. It will continue to remain available to
78-
help people migrate, but it **WILL** be phased out entirely in the future.
79-
80-
## I run in a restricted environment. What should I do?
81-
82-
For impacted users that run in a restricted environment, the best option is to copy over the
83-
required images to a private registry or configure a pull-through cache in their registry.
84-
85-
There are several tools to copy images between registries;
86-
[crane](https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane_copy.md) is one
87-
of those tools, and images can be copied to a private registry by using `crane copy SRC DST`. There
88-
are also vendor-specific tools, like e.g. Google’s
89-
[gcrane](https://cloud.google.com/container-registry/docs/migrate-external-containers#copy), that
90-
perform a similar function but are streamlined for their platform.
91-
92-
## How can I check registry.k8s.io is accessible from my cluster?
36+
## How can I check if I am impacted?
9337

9438
To test connectivity to registry.k8s.io and being able to pull images from there, here is a sample
9539
command that can be executed in the namespace of your choosing:
9640

9741
```
98-
kubectl run hello-world --tty --rm -i --image=registry.k8s.io/busybox:latest sh
42+
kubectl run hello-world -ti --rm --image=registry.k8s.io/busybox:latest --restart=Never -- date
9943
```
10044

10145
When you run the command above, here’s what to expect when things work correctly:
10246

10347
```
104-
$ kubectl run hello-world --tty --rm -i --image=registry.k8s.io/busybox:latest sh
105-
If you don't see a command prompt, try pressing enter.
106-
/ # exit
107-
Session ended, resume using 'kubectl attach hello-world -c hello-world -i -t' command when the pod is running
48+
$ kubectl run hello-world -ti --rm --image=registry.k8s.io/busybox:latest --restart=Never -- date
49+
Fri Feb 31 07:07:07 UTC 2023
10850
pod "hello-world" deleted
10951
```
11052

111-
112-
## What kind of errors will I see if I’m impacted?
53+
## What kind of errors will I see if I’m impacted?
11354

11455
Errors may depend on what kind of container runtime you are using, and what endpoint you are routed
11556
to, but it should present such as `ErrImagePull`, `ImagePullBackOff`, or a container failing to be
@@ -122,6 +63,25 @@ certificate:
12263
FailedCreatePodSandBox: Failed to create pod sandbox: rpc error: code = Unknown desc = Error response from daemon: Head “https://us-west1-docker.pkg.dev/v2/k8s-artifacts-prod/images/pause/manifests/3.8”: x509: certificate signed by unknown authority
12364
```
12465

66+
## What images will be impacted?
67+
68+
**ALL** images on k8s.gcr.io will be impacted by this change. k8s.gcr.io hosts many images beyond
69+
Kubernetes releases. A large number of Kubernetes subprojects host their images there as well. Some
70+
examples include the `dns/k8s-dns-node-cache`, `ingress-nginx/controller`, and
71+
`node-problem-detector/node-problem-detector` images.
72+
73+
## I am impacted. What should I do?
74+
75+
For impacted users that run in a restricted environment, the best option is to copy over the
76+
required images to a private registry or configure a pull-through cache in their registry.
77+
78+
There are several tools to copy images between registries;
79+
[crane](https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane_copy.md) is one
80+
of those tools, and images can be copied to a private registry by using `crane copy SRC DST`. There
81+
are also vendor-specific tools, like e.g. Google’s
82+
[gcrane](https://cloud.google.com/container-registry/docs/migrate-external-containers#copy), that
83+
perform a similar function but are streamlined for their platform.
84+
12585
## How can I find which images are using the legacy registry, and fix them?
12686

12787
**Option 1**: See the one line kubectl command in our [earlier blog
@@ -170,6 +130,43 @@ considered a stopgap till your manifests have been updated. You can
170130
find a (third party) Mutating Webhook and Kyverno policy in
171131
[k8s-gcr-quickfix](https://github.com/abstractinfrastructure/k8s-gcr-quickfix).
172132

133+
## Why did Kubernetes change to a different image registry?
134+
135+
k8s.gcr.io is hosted on a custom [Google Container Registry
136+
(GCR)](https://cloud.google.com/container-registry) domain that was set up solely for the Kubernetes
137+
project. This has worked well since the inception of the project, and we thank Google for providing
138+
these resources, but today, there are other cloud providers and vendors that would like to host
139+
images to provide a better experience for the people on their platforms. In addition to Google’s
140+
[renewed commitment to donate $3
141+
million](https://www.cncf.io/google-cloud-recommits-3m-to-kubernetes/) to support the project's
142+
infrastructure last year, Amazon Web Services announced a matching donation [during their Kubecon NA
143+
2022 keynote in Detroit](https://youtu.be/PPdimejomWo?t=236). This will provide a better experience
144+
for users (closer servers = faster downloads) and will reduce the egress bandwidth and costs from
145+
GCR at the same time.
146+
147+
For more details on this change, check out [registry.k8s.io: faster, cheaper and Generally Available
148+
(GA)](/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/).
149+
150+
## Why is a redirect being put in place?
151+
152+
The project switched to [registry.k8s.io last year with the 1.25
153+
release](https://kubernetes.io/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/); however, most of
154+
the image pull traffic is still directed at the old endpoint k8s.gcr.io. This has not been
155+
sustainable for us as a project, as it is not utilizing the resources that have been donated to the
156+
project from other providers, and we are in the danger of running out of funds due to the cost of
157+
serving this traffic.
158+
159+
A redirect will enable the project to take advantage of these new resources, significantly reducing
160+
our egress bandwidth costs. We only expect this change to impact a small subset of users running in
161+
restricted environments or using very old clients that do not respect redirects properly.
162+
163+
## What will happen to k8s.gcr.io?
164+
165+
Separate from the the redirect, k8s.gcr.io will be frozen [and will not be updated with new images
166+
after April 3rd, 2023](https://kubernetes.io/blog/2023/02/06/k8s-gcr-io-freeze-announcement/). `k8s.gcr.io`
167+
will not get any new releases, patches, or security updates. It will continue to remain available to
168+
help people migrate, but it **WILL** be phased out entirely in the future.
169+
173170
## I still have questions, where should I go?
174171

175172
For more information on registry.k8s.io and why it was developed, see [registry.k8s.io: faster,

0 commit comments

Comments
 (0)