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

Remove remaining references to k8s.gcr.io #16200

Merged
merged 2 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/addons/gpu/nvidia-driver-installer.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ spec:
- name: root-mount
mountPath: /root
containers:
- image: "{{default "k8s.gcr.io" .ImageRepository}}/{{.Images.Pause}}"
- image: "{{default "registry.k8s.io" .ImageRepository}}/{{.Images.Pause}}"
name: pause
2 changes: 1 addition & 1 deletion deploy/addons/gvisor/gvisor-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ oom_score = 0
stream_server_address = ""
stream_server_port = "10010"
enable_selinux = false
sandbox_image = "{{default "k8s.gcr.io" .ImageRepository}}/pause:3.1"
sandbox_image = "{{default "registry.k8s.io" .ImageRepository}}/pause:3.1"
stats_collect_period = 10
systemd_cgroup = false
enable_tls_streaming = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ oom_score = 0
stream_server_address = ""
stream_server_port = "10010"
enable_selinux = false
sandbox_image = "k8s.gcr.io/pause:3.6"
sandbox_image = "registry.k8s.io/pause:3.6"
stats_collect_period = 10
enable_tls_streaming = false
max_container_log_line_size = 16384
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ oom_score = 0
stream_server_address = ""
stream_server_port = "10010"
enable_selinux = false
sandbox_image = "k8s.gcr.io/pause:3.6"
sandbox_image = "registry.k8s.io/pause:3.6"
stats_collect_period = 10
enable_tls_streaming = false
max_container_log_line_size = 16384
Expand Down
2 changes: 1 addition & 1 deletion deploy/iso/minikube-iso/package/crio-bin/crio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ global_auth_file = ""

# The image used to instantiate infra containers.
# This option supports live configuration reload.
pause_image = "k8s.gcr.io/pause:3.2"
pause_image = "registry.k8s.io/pause:3.2"

# The path to a file containing credentials specific for pulling the pause_image from
# above. The file is similar to that of /var/lib/kubelet/config.json
Expand Down
2 changes: 1 addition & 1 deletion deploy/iso/minikube-iso/package/crio-bin/crio.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ global_auth_file = ""

# The image used to instantiate infra containers.
# This option supports live configuration reload.
pause_image = "k8s.gcr.io/pause:3.2"
pause_image = "registry.k8s.io/pause:3.2"

# The path to a file containing credentials specific for pulling the pause_image from
# above. The file is similar to that of /var/lib/kubelet/config.json
Expand Down
2 changes: 1 addition & 1 deletion deploy/kicbase/containerd.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ oom_score = 0
stream_server_address = ""
stream_server_port = "10010"
enable_selinux = false
sandbox_image = "k8s.gcr.io/pause:3.6"
sandbox_image = "registry.k8s.io/pause:3.6"
stats_collect_period = 10
enable_tls_streaming = false
max_container_log_line_size = 16384
Expand Down
2 changes: 1 addition & 1 deletion pkg/addons/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ func supportLegacyIngress(addon *assets.Addon, cc config.ClusterConfig) error {
"KubeWebhookCertgenPatch": "docker.io/jettech/kube-webhook-certgen:v1.5.1@sha256:950833e19ade18cd389d647efb88992a7cc077abedef343fa59e012d376d79b7",
}
addon.Registries = map[string]string{
"IngressController": "k8s.gcr.io",
"IngressController": "registry.k8s.io",
}
return nil
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ var Addons = map[string]*Addon{
"Alpine": "alpine:3.6@sha256:66790a2b79e1ea3e1dabac43990c54aca5d1ddf268d9a5a0285e4167c8b24475",
"Kibana": "kibana/kibana:5.6.2@sha256:cd948a9bda4622f1437afc4a3e78be6c8c25fc62f40aa0376f3d690f2436568f",
}, map[string]string{
"Elasticsearch": "k8s.gcr.io",
"FluentdElasticsearch": "k8s.gcr.io",
"Elasticsearch": "registry.k8s.io",
"FluentdElasticsearch": "registry.k8s.io",
"Kibana": "docker.elastic.co",
"Alpine": "docker.io",
}),
Expand Down Expand Up @@ -446,8 +446,8 @@ var Addons = map[string]*Addon{
"NvidiaDriverInstaller": "minikube-nvidia-driver-installer:e2d9b43228decf5d6f7dce3f0a85d390f138fa01",
"Pause": "pause:2.0@sha256:9ce5316f9752b8347484ab0f6778573af15524124d52b93230b9a0dcc987e73e",
}, map[string]string{
"NvidiaDriverInstaller": "k8s.gcr.io",
"Pause": "k8s.gcr.io",
"NvidiaDriverInstaller": "registry.k8s.io",
"Pause": "registry.k8s.io",
}),
"nvidia-gpu-device-plugin": NewAddon([]*BinAsset{
MustBinAsset(addons.NvidiaGpuDevicePluginAssets,
Expand All @@ -458,7 +458,7 @@ var Addons = map[string]*Addon{
}, false, "nvidia-gpu-device-plugin", "3rd party (Nvidia)", "", "https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/", map[string]string{
"NvidiaDevicePlugin": "nvidia-gpu-device-plugin@sha256:4b036e8844920336fa48f36edeb7d4398f426d6a934ba022848deed2edbf09aa",
}, map[string]string{
"NvidiaDevicePlugin": "k8s.gcr.io",
"NvidiaDevicePlugin": "registry.k8s.io",
}),
"logviewer": NewAddon([]*BinAsset{
MustBinAsset(addons.LogviewerAssets,
Expand Down Expand Up @@ -591,7 +591,7 @@ var Addons = map[string]*Addon{
"GCPAuthWebhook": "k8s-minikube/gcp-auth-webhook:v0.0.14@sha256:60fc3f336083dcd0a472caa51edfbf497d4df37115bb65e2d12739ed461db925",
}, map[string]string{
"GCPAuthWebhook": "gcr.io",
"KubeWebhookCertgen": "k8s.gcr.io",
"KubeWebhookCertgen": "registry.k8s.io",
}),
"volumesnapshots": NewAddon([]*BinAsset{
// make sure the order of apply. `csi-hostpath-snapshotclass` must be the first position, because it depends on `snapshot.storage.k8s.io_volumesnapshotclasses`
Expand Down Expand Up @@ -948,8 +948,8 @@ func GenerateTemplateData(addon *Addon, cc *config.ClusterConfig, netInfo Networ
// tl;dr If the user specified a custom image remove the default registry
// Without the line below, if you try to overwrite an image the default registry is still used in the templating
// Example - image name: MetricsScraper, default registry: docker.io, default image: kubernetesui/metrics-scraper
// Passed on addon enable: --images=MetricsScraper=k8s.gcr.io/echoserver:1.4
// Without this line the resulting image would be docker.io/k8s.gcr.io/echoserver:1.4
// Passed on addon enable: --images=MetricsScraper=registry.k8s.io/echoserver:1.4
// Without this line the resulting image would be docker.io/registry.k8s.io/echoserver:1.4
if _, ok := cc.CustomAddonImages[name]; ok {
opts.Registries[name] = ""
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
)

const (
// builds a docker v2 repository API call in the format https://k8s.gcr.io/v2/coredns/coredns/tags/list
// builds a docker v2 repository API call in the format https://registry.k8s.io/v2/coredns/coredns/tags/list
tagURLTemplate = "https://%s/v2/%s/tags/list"
)

Expand Down Expand Up @@ -70,7 +70,7 @@ func componentImage(name string, v semver.Version, mirror string) string {
return fmt.Sprintf("%s:v%s", path.Join(kubernetesRepo(mirror, v), name), v)
}

// fixes 13136 by getting the latest image version from the k8s.gcr.io repository instead of hardcoded
// fixes 13136 by getting the latest image version from the registry.k8s.io repository instead of hardcoded
func findLatestTagFromRepository(url string, lastKnownGood string) string {
client := &http.Client{}
errorMsg := fmt.Sprintf("Failed to get latest image version for %s, reverting to version %s.", url, lastKnownGood)
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type ClusterConfig struct {
KubernetesConfig KubernetesConfig
Nodes []Node
Addons map[string]bool
CustomAddonImages map[string]string // Maps image names to the image to use for addons. e.g. Dashboard -> k8s.gcr.io/echoserver:1.4 makes dashboard addon use echoserver for its Dashboard deployment.
CustomAddonImages map[string]string // Maps image names to the image to use for addons. e.g. Dashboard -> registry.k8s.io/echoserver:1.4 makes dashboard addon use echoserver for its Dashboard deployment.
CustomAddonRegistries map[string]string // Maps image names to the registry to use for addons. See CustomAddonImages for example.
VerifyComponents map[string]bool // map of components to verify and wait for after start.
StartHostTimeout time.Duration
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/image/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func DeleteFromCacheDir(images []string) error {
// SaveToDir will cache images on the host
//
// The cache directory currently caches images using the imagename_tag
// For example, k8s.gcr.io/kube-addon-manager:v6.5 would be
// stored at $CACHE_DIR/k8s.gcr.io/kube-addon-manager_v6.5
// For example, registry.k8s.io/kube-addon-manager:v6.5 would be
// stored at $CACHE_DIR/registry.k8s.io/kube-addon-manager_v6.5
func SaveToDir(images []string, cacheDir string, overwrite bool) error {
var g errgroup.Group
for _, image := range images {
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/reason/match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap,
{4913, "linux", "PR_KVM_CREATE_BUSY", `Unable to start VM: create: Error creating machine: Error in driver during machine creation: error creating VM: virError(Code=1, Domain=10, Message='internal error: process exited while connecting to monitor: ioctl(KVM_CREATE_VM) failed: 16 Device or resource busy`},
{5950, "linux", "PR_KVM_ISO_PERMISSION", `Retriable failure: create: Error creating machine: Error in driver during machine creation: error creating VM: virError(Code=1, Domain=10, Message='internal error: qemu unexpectedly closed the monitor: 2019-11-19T16:08:16.757609Z qemu-kvm: -drive file=/home/lnicotra/.minikube/machines/minikube/boot2docker.iso,format=raw,if=none,id=drive-scsi0-0-0-2,readonly=on: could not open disk image /home/lnicotra/.minikube/machines/minikube/boot2docker.iso: Could not open '/home/lnicotra/.minikube/machines/minikube/boot2docker.iso': Permission denied'`},
{5836, "", "SVC_OPEN_NOT_FOUND", `Error opening service: Service kubernetes-bootcamp was not found in "default" namespace. You may select another namespace by using 'minikube service kubernetes-bootcamp -n : Temporary Error: Error getting service kubernetes-bootcamp: services "kubernetes-bootcamp" not found`},
{3898, "", "INET_PULL_TIMEOUT", `[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-controller-manager:v1.17.0: output: Error response from daemon: Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)`},
{3898, "", "INET_PULL_TIMEOUT", `[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.17.0: output: Error response from daemon: Get https://registry.k8s.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)`},
{6079, "darwin", "PR_HYPERKIT_CRASHED", `Error creating machine: Error in driver during machine creation: hyperkit crashed! command line:`},
{5636, "linux", "INET_DEFAULT_ROUTE", `Unable to get VM IP address: unable to select an IP from default routes.`},
{6087, "", "GUEST_DOES_NOT_EXIST", `Error getting host status: state: machine does not exist`},
Expand Down
4 changes: 2 additions & 2 deletions site/content/en/docs/contrib/tests.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Steps:
asserts basic "service" command functionality

#### validateServiceCmdDeployApp
Create a new `k8s.gcr.io/echoserver` deployment
Create a new `registry.k8s.io/echoserver` deployment

#### validateServiceCmdList
Run `minikube service list` to make sure the newly created service is correctly listed in the output
Expand All @@ -314,7 +314,7 @@ Run `minikube service` with a regular `--url` to make sure the HTTP endpoint URL
#### validateServiceCmdConnect

Steps:
- Create a new `k8s.gcr.io/echoserver` deployment
- Create a new `registry.k8s.io/echoserver` deployment
- Run `minikube service` with a regular `--url` to make sure the HTTP endpoint URL of the service is printed
- Make sure we can hit the endpoint URL with an HTTP GET request

Expand Down
8 changes: 4 additions & 4 deletions site/content/en/docs/handbook/addons/custom-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ minikube addons images efk
|----------------------|------------------------------|-------------------|
| IMAGE NAME | DEFAULT IMAGE | DEFAULT REGISTRY |
|----------------------|------------------------------|-------------------|
| Elasticsearch | elasticsearch:v5.6.2 | k8s.gcr.io |
| FluentdElasticsearch | fluentd-elasticsearch:v2.0.2 | k8s.gcr.io |
| Elasticsearch | elasticsearch:v5.6.2 | registry.k8s.io |
| FluentdElasticsearch | fluentd-elasticsearch:v2.0.2 | registry.k8s.io |
| Alpine | alpine:3.6 | |
| Kibana | kibana/kibana:5.6.2 | docker.elastic.co |
|----------------------|------------------------------|-------------------|
Expand All @@ -31,7 +31,7 @@ An empty registry means the image is stored locally or default registry `docker.

The `IMAGE NAME` column is used to customize the corresponding image and registry.

Assume we have a private registry at `192.168.10.2:5555` to replace `k8s.gcr.io` and a locally built Kibana called `kibana/kibana:5.6.2-custom`.
Assume we have a private registry at `192.168.10.2:5555` to replace `registry.k8s.io` and a locally built Kibana called `kibana/kibana:5.6.2-custom`.

We could load local images to minikube by:

Expand All @@ -54,4 +54,4 @@ minikube addons enable efk --images="Kibana=kibana/kibana:5.6.2-custom" --regist
🌟 The 'efk' addon is enabled
```

Now the `efk` addon is using the custom registry and images.
Now the `efk` addon is using the custom registry and images.
30 changes: 10 additions & 20 deletions site/content/en/docs/handbook/offline.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ description: >
minikube has built-in support for caching downloaded resources into `$MINIKUBE_HOME/cache`. Here are the important file locations:

* `~/.minikube/cache` - Top-level folder
* `~/.minikube/cache/iso` - VM ISO image. Typically updated once per major minikube release.
* `~/.minikube/cache/images` - Docker images used by Kubernetes.
* `~/.minikube/cache/<version>` - Kubernetes binaries, such as `kubeadm` and `kubelet`
* `~/.minikube/cache/iso/<arch>` - VM ISO image. Typically updated once per major minikube release.
* `~/.minikube/cache/kic/<arch>` - Docker base image. Typically updated once per major minikube release.
* `~/.minikube/cache/images/<arch>` - Images used by Kubernetes, only exists if preload doesn't exist.
* `~/.minikube/cache/<os>/<arch>/<version>` - Kubernetes binaries, such as `kubeadm` and `kubelet`
* `~/.minikube/cache/preloaded-tarball` - Tarball of preloaded images to improve start time

## Kubernetes image cache

Expand All @@ -22,25 +24,13 @@ NOTE: the `none` driver caches images directly into Docker rather than a separat

## Sharing the minikube cache

For offline use on other hosts, one can copy the contents of `~/.minikube/cache`. As of the v1.0 release, this directory contains 685MB of data:
For offline use on other hosts, one can copy the contents of `~/.minikube/cache`.

```text
cache/iso/minikube-v1.0.0.iso
cache/images/gcr.io/k8s-minikube/storage-provisioner_v1.8.1
cache/images/k8s.gcr.io/k8s-dns-sidecar-amd64_1.14.13
cache/images/k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64_1.14.13
cache/images/k8s.gcr.io/kubernetes-dashboard-amd64_v1.10.1
cache/images/k8s.gcr.io/kube-scheduler_v1.14.0
cache/images/k8s.gcr.io/coredns_1.3.1
cache/images/k8s.gcr.io/kube-controller-manager_v1.14.0
cache/images/k8s.gcr.io/kube-apiserver_v1.14.0
cache/images/k8s.gcr.io/pause_3.1
cache/images/k8s.gcr.io/etcd_3.3.10
cache/images/k8s.gcr.io/kube-addon-manager_v9.0
cache/images/k8s.gcr.io/k8s-dns-kube-dns-amd64_1.14.13
cache/images/k8s.gcr.io/kube-proxy_v1.14.0
cache/v1.14.0/kubeadm
cache/v1.14.0/kubelet
cache/linux/amd64/v1.26.1/kubectl
cache/kic/amd64/kicbase_v0.0.37@sha256_8bf7a0e8a062bc5e2b71d28b35bfa9cc862d9220e234e86176b3785f685d8b15.tar
cache/preloaded-tarball/preloaded-images-k8s-v18-v1.26.1-docker-overlay2-amd64.tar.lz4
cache/preloaded-tarball/preloaded-images-k8s-v18-v1.26.1-docker-overlay2-amd64.tar.lz4.checksum
```

If any of these files exist, minikube will use copy them into the VM directly rather than pulling them from the internet.
2 changes: 1 addition & 1 deletion site/content/en/docs/handbook/pushing.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ buildctl --addr unix://buildkitd.sock build \
--frontend=dockerfile.v0 \
--local context=. \
--local dockerfile=. \
--output type=image,name=k8s.gcr.io/username/imagename:latest
--output type=image,name=registry.k8s.io/username/imagename:latest
```

Now you can 'build' against the storage inside minikube. which is instantly accessible to kubernetes cluster.
Expand Down
8 changes: 4 additions & 4 deletions site/content/en/docs/handbook/vpn_and_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ This error indicates that the host:port combination defined by HTTPS_PROXY or HT
```text
Unable to pull images, which may be OK:

failed to pull image "k8s.gcr.io/kube-apiserver:v1.13.3": output: Error response from daemon:
Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection
failed to pull image "registry.k8s.io/kube-apiserver:v1.13.3": output: Error response from daemon:
Get https://registry.k8s.io/v2/: net/http: request canceled while waiting for connection
(Client.Timeout exceeded while awaiting headers)
```

Expand All @@ -82,9 +82,9 @@ This error indicates that the container runtime running within the VM does not h
#### x509: certificate signed by unknown authority

```text
[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.13.3:
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.13.3:
output: Error response from daemon:
Get https://k8s.gcr.io/v2/: x509: certificate signed by unknown authority
Get https://registry.k8s.io/v2/: x509: certificate signed by unknown authority
```

This is because minikube VM is stuck behind a proxy that rewrites HTTPS responses to contain its own TLS certificate. The [solution](https://github.com/kubernetes/minikube/issues/3613#issuecomment-461034222) is to install the proxy certificate into a location that is copied to the VM at startup, so that it can be validated.
Expand Down
Loading