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 |