Skip to content

Instantly share code, notes, and snippets.

@yidinghan
Last active August 13, 2018 15:29
Show Gist options
  • Save yidinghan/4ea858ac8769c35e028aa61a58dfcc44 to your computer and use it in GitHub Desktop.
Save yidinghan/4ea858ac8769c35e028aa61a58dfcc44 to your computer and use it in GitHub Desktop.
#!/bin/bash
imagepreifx=registry.cn-hangzhou.aliyuncs.com/k8sth
images='kube-proxy-amd64:v1.11.2 kube-scheduler-amd64:v1.11.2 kube-controller-manager-amd64:v1.11.2 kube-apiserver-amd64:v1.11.2 etcd-amd64:3.2.18 coredns:1.1.3 pause:3.1 kubernetes-dashboard-amd64:v1.8.3'
for imageName in $images ; do
docker pull $imagepreifx/$imageName
docker tag $imagepreifx/$imageName k8s.gcr.io/$imageName
#docker rmi $imagepreifx/$imageName
done
dnsimagepreifx=registry.docker-cn.com/rancher
dnsimages='k8s-dns-kube-dns-amd64:1.14.9 k8s-dns-dnsmasq-nanny-amd64:1.14.9 k8s-dns-sidecar-amd64:1.14.9'
for imageName in $dnsimages ; do
docker pull $dnsimagepreifx/$imageName
docker tag $dnsimagepreifx/$imageName k8s.gcr.io/$imageName
#docker rmi $dnsimagepreifx/$imageName
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment