docker.sh
#!/bin/bash images=`kubeadm config images list --kubernetes-version=v1.17.4|awk -F '/' '{print $2}'` for image in $images do docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/$image if [ $? -eq 0 ];then docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/$image k8s.gcr.io/$image docker rmi registry.cn-hangzhou.aliyuncs.com/google_containers/$image else echo "ERROR: 下载镜像报错,$image" fi done