You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Select an accessible image repository for some users
Now it's possible to fallback to a mirror site for those users
who cannot access the main k8s.gcr.io repository. You may also
set the --image-mirror-country to forcibly use a known local
mirror in the specific location.
Signed-off-by: Zhongcheng Lao <[email protected]>
startCmd.Flags().StringSliceVar(&insecureRegistry, "insecure-registry", nil, "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.")
129
133
startCmd.Flags().StringSliceVar(®istryMirror, "registry-mirror", nil, "Registry mirrors to pass to the Docker daemon")
130
134
startCmd.Flags().String(imageRepository, "", "Alternative image repository to pull docker images from. This can be used when you have limited access to gcr.io. For Chinese mainland users, you may use local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers")
135
+
startCmd.Flags().String(imageMirrorCountry, "", "Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn")
131
136
startCmd.Flags().String(containerRuntime, "docker", "The container runtime to be used (docker, crio, containerd)")
132
137
startCmd.Flags().String(criSocket, "", "The cri socket path to be used")
133
138
startCmd.Flags().String(kubernetesVersion, constants.DefaultKubernetesVersion, "The kubernetes version that the minikube VM will use (ex: v1.2.3)")
exit.WithError("Failed to check main repository and mirrors for images for images", err)
185
+
}
186
+
187
+
if!found {
188
+
ifrepository=="" {
189
+
exit.WithCode(exit.Failure, "None of known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag")
190
+
} else {
191
+
console.Warning("None of known repositories in your location is accessible. Use %s as fallback.", repository)
0 commit comments