Created
February 18, 2021 13:04
-
-
Save yhu-ctrl/6d94359d8a3f1af28e7165eeb2454df0 to your computer and use it in GitHub Desktop.
从国内镜像站拉取k8s所需镜像,并重命名
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
images_list=`kubeadm config images list` | |
mirrors_url='registry.cn-hangzhou.aliyuncs.com/google_containers' | |
for need_image in $images_list; do | |
down_image="$mirrors_url/${need_image##*/}" | |
docker pull $down_image | |
docker tag $down_image $need_image | |
docker rmi $down_image | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment