kubeadm docker镜像拉取脚本

  

 

#!/bin/bash

images=($(kubeadm config images list))

for image in ${images[*]};do
	echo -e "\e[7mdownload $image\e[0m"
	if [[ $image =~ coredns ]];then
		image_=coredns:${image##*v}
		echo $image_ $image
		docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/$image_
		docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/$image_ $image
		docker image rm registry.cn-hangzhou.aliyuncs.com/google_containers/$image_
	else
		image=${image#*/}
		echo $image
		docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/$image
		docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/$image k8s.gcr.io/$image
		docker image rm registry.cn-hangzhou.aliyuncs.com/google_containers/$image
	fi
done

  

上一篇:手撕书系列 之 《High Speed Serdes Devices and Applications》 (一)


下一篇:在CentOS 7上安装.NET Core R2跑Hello World