k8s 怎样为gcr.io加速?

最近在搭建k8s,发现很受网络的影响

已邀请:

chenqinghe

赞同来自:

https://github.com/chenqinghe/k8s-docker-images

这有种方法,不过就是版本不太好确定

stansun

赞同来自:

大部分镜像可以从阿里云下载。 具体可以参考这篇 https://github.com/DavadDi/go_study/blob/master/kubeadm_centos7.4_install.md https://kubernetes.io/docs/setup/

我搭建时从/var/log/message从查看日志: 如果报 No image gcr.io/google_containers/kube-apiserver-amd64:v1.9.6, 我就从阿里云上面下载:https://dev.aliyun.com/search.html 例如: [root@tflink-1] /etc/kubernetes/manifests$ grep -R gcr.io . ./kube-controller-manager.yaml: image: gcr.io/google_containers/kube-controller-manager-amd64:v1.9.6 ./kube-scheduler.yaml: image: gcr.io/google_containers/kube-scheduler-amd64:v1.9.6 ./kube-apiserver.yaml: image: gcr.io/google_containers/kube-apiserver-amd64:v1.9.6 ./etcd.yaml: image: gcr.io/google_containers/etcd-amd64:3.1.11

[root@tflink-1] /home/chu$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver-amd64 v1.9.6 a5c066e8c9bf 5 days ago 212 MB registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager-amd64 v1.9.6 472b6fcfe871 5 days ago 139 MB registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler-amd64 v1.9.6 25d7b2c6f653 5 days ago 62.9 MB registry.cn-hangzhou.aliyuncs.com/google_containers/etcd-amd64 3.1.11 59d36f27cceb 3 months ago 194 MB

[root@tflink-1] /home/chu$ docker tag a5c066e8c9bf gcr.io/google_containers/kube-apiserver-amd64:v1.9.6 [root@tflink-1] /home/chu$ docker tag 472b6fcfe871 gcr.io/google_containers/kube-controller-manager-amd64:v1.9.6 [root@tflink-1] /home/chu$ docker tag 25d7b2c6f653 gcr.io/google_containers/kube-scheduler-amd64:v1.9.6 [root@tflink-1] /home/chu$ docker tag 59d36f27cceb gcr.io/google_containers/etcd-amd64:3.1.11 最后补齐了所有的镜像。

要回复问题请先登录注册