diff --git a/.vuepress/public/install-script/v1.21.x/init_master.sh b/.vuepress/public/install-script/v1.21.x/init_master.sh index 216ed39..53f7cbf 100644 --- a/.vuepress/public/install-script/v1.21.x/init_master.sh +++ b/.vuepress/public/install-script/v1.21.x/init_master.sh @@ -56,7 +56,7 @@ cp -i /etc/kubernetes/admin.conf /root/.kube/config echo "" echo "安装calico-3.17.1" rm -f calico-3.17.1.yaml -kubectl create -f https://kuboard.cn/install-script/v1.20.x/calico-operator.yaml -wget https://kuboard.cn/install-script/v1.20.x/calico-custom-resources.yaml +kubectl create -f https://kuboard.cn/install-script/v1.21.x/calico-operator.yaml +wget https://kuboard.cn/install-script/v1.21.x/calico-custom-resources.yaml sed -i "s#192.168.0.0/16#${POD_SUBNET}#" calico-custom-resources.yaml kubectl create -f calico-custom-resources.yaml diff --git a/install/history-k8s/install-k8s-1.20.x.md b/install/history-k8s/install-k8s-1.20.x.md index e29151e..121e09f 100644 --- a/install/history-k8s/install-k8s-1.20.x.md +++ b/install/history-k8s/install-k8s-1.20.x.md @@ -184,7 +184,7 @@ default via 172.21.0.1 dev eth0 -**请将脚本最后的 1.20.1 替换成您需要的版本号(必须是 1.20 的小版本,不能是 1.19.1 等),** +**请将脚本最后的 1.20.6 替换成您需要的版本号(必须是 1.20 的小版本,不能是 1.19.1 等),** 脚本中间的 v1.20.x 不要替换 > docker hub 镜像请根据自己网络的情况任选一个 @@ -194,7 +194,7 @@ default via 172.21.0.1 dev eth0 > * 第十行为阿里云 docker hub 镜像 ``` sh # 在 master 节点和 worker 节点都要执行 -# 最后一个参数 1.20.1 用于指定 kubenetes 版本,支持所有 1.20.x 版本的安装 +# 最后一个参数 1.20.6 用于指定 kubenetes 版本,支持所有 1.20.x 版本的安装 # 腾讯云 docker hub 镜像 # export REGISTRY_MIRROR="https://mirror.ccs.tencentyun.com" # DaoCloud 镜像 @@ -203,13 +203,13 @@ default via 172.21.0.1 dev eth0 # export REGISTRY_MIRROR="https://05f073ad3c0010ea0f4bc00b7105ec20.mirror.swr.myhuaweicloud.com" # 阿里云 docker hub 镜像 export REGISTRY_MIRROR=https://registry.cn-hangzhou.aliyuncs.com -curl -sSL https://kuboard.cn/install-script/v1.20.x/install_kubelet.sh | sh -s 1.20.1 +curl -sSL https://kuboard.cn/install-script/v1.20.x/install_kubelet.sh | sh -s 1.20.6 ``` -手动执行以下代码,结果与快速安装相同。***请将脚本第79行(已高亮)的 ${1} 替换成您需要的版本号,例如 1.20.1*** +手动执行以下代码,结果与快速安装相同。***请将脚本第79行(已高亮)的 ${1} 替换成您需要的版本号,例如 1.20.6*** > docker hub 镜像请根据自己网络的情况任选一个 > * 第四行为腾讯云 docker hub 镜像 @@ -217,7 +217,7 @@ curl -sSL https://kuboard.cn/install-script/v1.20.x/install_kubelet.sh | sh -s 1 > * 第八行为阿里云 docker hub 镜像 ``` sh # 在 master 节点和 worker 节点都要执行 -# 最后一个参数 1.20.1 用于指定 kubenetes 版本,支持所有 1.20.x 版本的安装 +# 最后一个参数 1.20.6 用于指定 kubenetes 版本,支持所有 1.20.x 版本的安装 # 腾讯云 docker hub 镜像 # export REGISTRY_MIRROR="https://mirror.ccs.tencentyun.com" # DaoCloud 镜像 @@ -257,7 +257,7 @@ export REGISTRY_MIRROR=https://registry.cn-hangzhou.aliyuncs.com -**请将脚本最后的 1.20.1 替换成您需要的版本号(必须是 1.20 的小版本,不能是 1.19.1 等),** +**请将脚本最后的 1.20.6 替换成您需要的版本号(必须是 1.20 的小版本,不能是 1.19.1 等),** 脚本中间的 v1.20.x 不要替换 ``` sh {10} @@ -270,13 +270,13 @@ export APISERVER_NAME=apiserver.demo # Kubernetes 容器组所在的网段,该网段安装完成后,由 kubernetes 创建,事先并不存在于您的物理网络中 export POD_SUBNET=10.100.0.1/16 echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts -curl -sSL https://kuboard.cn/install-script/v1.20.x/init_master.sh | sh -s 1.20.1 +curl -sSL https://kuboard.cn/install-script/v1.20.x/init_master.sh | sh -s 1.20.6 ``` -手动执行以下代码,结果与快速初始化相同。***请将脚本第21行(已高亮)的 ${1} 替换成您需要的版本号,例如 1.20.1*** +手动执行以下代码,结果与快速初始化相同。***请将脚本第21行(已高亮)的 ${1} 替换成您需要的版本号,例如 1.20.6*** ``` sh # 只在 master 节点执行 @@ -297,6 +297,22 @@ echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts > 感谢 [https://github.com/zhangguanzhang/google_containers](https://github.com/zhangguanzhang/google_containers) 提供最新的 google_containers 国内镜像 +如果出现如下错误: +``` {5,6} +[config/images] Pulled registry.aliyuncs.com/k8sxio/pause:3.2 +[config/images] Pulled registry.aliyuncs.com/k8sxio/etcd:3.4.13-0 +failed to pull image "swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0": output: time="2021-04-30T13:26:14+08:00" level=fatal +msg="pulling image failed: rpc error: code = NotFound desc = failed to pull and unpack image \"swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0\": +failed to resolve reference \"swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0\": +swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0: not found", error: exit status 1 +To see the stack trace of this error execute with --v=5 or higher +``` +请执行如下命令: +> 在原命令的最后增加参数 `/coredns` +``` sh +curl -sSL https://kuboard.cn/install-script/v1.20.x/init_master.sh | sh -s 1.20.6 /coredns +``` + 如果出错点这里 diff --git a/install/install-k8s.md b/install/install-k8s.md index 2695523..1bd836b 100644 --- a/install/install-k8s.md +++ b/install/install-k8s.md @@ -15,7 +15,7 @@ meta: ## 文档特点
- +
参考此免费文档,98%以上的概率,您能够顺利完成 K8S 安装,极个别的问题可以到QQ群里免费答疑。 @@ -309,6 +309,7 @@ swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0: not found", error: exit status 1 To see the stack trace of this error execute with --v=5 or higher ``` 请执行如下命令: +> 在原命令的最后增加参数 `/coredns` ``` sh curl -sSL https://kuboard.cn/install-script/v1.21.x/init_master.sh | sh -s 1.21.0 /coredns ```