日常遇到一些gcr/github的容器镜像由于网络原因拉取速度较慢,或者无法拉取下来,整理一些方案。
使用阿里云加速k8s.gcr的下载
使用registry.aliyuncs.com/google_containers/
替换 k8s.gcr.io/sig-storage/
即可
Example
拉取CSI相关组件
export IMAGE=csi-attacher:v3.2.1
docker pull registry.aliyuncs.com/google_containers/$IMAGE && docker tag registry.aliyuncs.com/google_containers/$IMAGE k8s.gcr.io/sig-storage/$IMAGE
export IMAGE=csi-provisioner:v2.1.2
docker pull registry.aliyuncs.com/google_containers/$IMAGE && docker tag registry.aliyuncs.com/google_containers/$IMAGE k8s.gcr.io/sig-storage/$IMAGE
export IMAGE=csi-resizer:v1.2.0
docker pull registry.aliyuncs.com/google_containers/$IMAGE && docker tag registry.aliyuncs.com/google_containers/$IMAGE k8s.gcr.io/sig-storage/$IMAGE
export IMAGE=csi-snapshotter:v3.0.3
docker pull registry.aliyuncs.com/google_containers/$IMAGE && docker tag registry.aliyuncs.com/google_containers/$IMAGE k8s.gcr.io/sig-storage/$IMAGE
export IMAGE=csi-node-driver-registrar:v2.3.0
docker pull registry.aliyuncs.com/google_containers/$IMAGE && docker tag registry.aliyuncs.com/google_containers/$IMAGE k8s.gcr.io/sig-storage/$IMAGE