Ali cloud using a script pull the mirror and change the label k8s

When installed with kubeadm cluster and found that the default k8s mirror mirror source due to being unable to pull the wall need, so to change the label by way docker tag cloud by Ali download mirrors.

#!/bin/bash
# pull image form aliyun registry and docker tag k8s
# ##################################################
image_name=(
   kube-proxy:v1.15.1
   kube-scheduler:v1.15.1
   kube-controller-manager:v1.15.1
   kube-apiserver:v1.15.1
   coredns:1.3.1
   etcd:3.3.10
   pause:3.1
   ) 
aliyun_registry="registry.cn-hangzhou.aliyuncs.com/google_containers/"

k8s_registry="k8s.gcr.io/"
 
for image in ${image_name[@]};do
   docker pull $aliyun_registry$image
   docker tag $aliyun_registry$image $k8s_registry$image
done
 
 

Guess you like

Origin www.cnblogs.com/lingshu/p/11282482.html