2.0 | kubernetes: Docker Desktop 安装单节点 k8s 集群

修改镜像配置:

1
2
3
4
5
6
7
"registry-mirrors": [
"https://reg-mirror.qiniu.com",
"https://docker.mirrors.ustc.edu.cn",
"https://dockerhub.azk8s.cn",
"https://hub-mirror.c.163.com",
"https://registry.docker-cn.com"
]

运行下面脚本,从阿里云镜像源拉取镜像,然后重新打 tag 为 k8s.gcr.io/xxxx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
to be continued...
#!/bin/bash

set -e
KUBE_VERSION=v1.19.3
KUBE_PAUSE_VERSION=3.2
ETCD_VERSION=3.4.13-0
COREDNS_VERSION=1.7.0
GCR_URL=k8s.gcr.io
ALIYUN_URL=registry.cn-hangzhou.aliyuncs.com/google_containers

# get images
images=(kube-proxy:${KUBE_VERSION}
kube-scheduler:${KUBE_VERSION}
kube-controller-manager:${KUBE_VERSION}
kube-apiserver:${KUBE_VERSION}
pause:${KUBE_PAUSE_VERSION}
etcd:${ETCD_VERSION}
coredns:${COREDNS_VERSION})

for imageName in ${images[@]} ; do
docker pull $ALIYUN_URL/$imageName
docker tag $ALIYUN_URL/$imageName $GCR_URL/$imageName
docker rmi $ALIYUN_URL/$imageName
done

# show images
docker images

2.0 | kubernetes: Docker Desktop 安装单节点 k8s 集群

https://eucham.me/2021/10/13/9877d33625fe.html

作者

遇寻

发布于

2021-10-13

更新于

2021-10-13

许可协议

评论