此方案需有*环境
打开并登陆谷歌云控制台:https://console.cloud.google.com/
点击激活Cloud Shell
点击后即可进入Cloud Shell终端
在终端内执行命令从谷歌镜像仓库拉取镜像,然后登陆阿里云镜像仓库,给镜像重新打标记,最后将镜像推送至阿里云镜像仓库
# 在控制台从谷歌镜像仓库拉下镜像
docker pull k8s.gcr.io/ingress-nginx/controller:v1.0.0
docker pull k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0
# 登录阿里云镜像仓库,该命令后会提示输入密码,输入后即可登陆成功
docker login --username=username registry.cn-hangzhou.aliyuncs.com
# 以ingress-nginx controller为例,给镜像重新打上tag
docker tag k8s.gcr.io/ingress-nginx/controller:v1.0.0 registry.cn-hangzhou.aliyuncs.com/liuuuu/ingress-nginx-controller:v1.0.0
# 将镜像推送到阿里云镜像仓库
docker push registry.cn-hangzhou.aliyuncs.com/liuuuu/ingress-nginx-controller:v1.0.0
完成后即可通过国内网络拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/liuuuu/ingress-nginx-controller:v1.0.0