kubeadm 部署k8s 映象翻牆解決辦法

翟雨佳blogs發表於2020-12-22

這裡是部署k8s 1.19.2

tag

 

#!/bin/bash
images=(
kube-apiserver:v1.19.2
kube-controller-manager:v1.19.2
kube-scheduler:v1.19.2
kube-proxy:v1.19.2
etcd:3.4.13-0
coredns:1.7.0
pause:3.2
)
for imageName in ${images[@]} ; do
    docker pull registry.aliyuncs.com/google_containers/$imageName
    docker tag registry.aliyuncs.com/google_containers/$imageName k8s.gcr.io/$imageName
    docker rmi registry.aliyuncs.com/google_containers/$imageName
done

手動save映象 

docker save -o kubeproxy.tar.gz  k8s.gcr.io/kube-proxy:v1.18.2

scp kubeproxy.tar.gz  security@192.168.10.103:/home/security

 手動load映象

docker load -i xxx.tar.gz

kubeadm init時候指定image-repository

 

--image-repository registry.aliyuncs.com/google_container

 

相關文章