主节点从属节点都需设置
- 安装需要软件
apt-get install -y curl
apt-get install socat
apt-get install conntrack - 设置时区
timedatectl set-timezone Asia/Shanghai - 更新软件列表
apt-get update - 安装chrony
apt-get install -y chrony - 查看当前系统的时间同步源信息
chronyc -n sources -v - 查看时间
timedatectl status
主节点单独
- 下载 KubeKey
export KKZONE=cn
curl -sfL https://get-kk.kubesphere.io | VERSION=v2.3.0 sh –
chmod +x kk - 开始安装
(./kk create config [–with-kubernetes version] [–with-kubesphere version] [(-f | --file) path])
./kk create cluster --with-kubernetes v1.22.10 --with-kubesphere v3.3.1 - 查看安装结果
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f
最后会显示用户名和密码以及登录网址
从节点加入
-
创建配置文件 (sample.yaml)
./kk create config --from-cluster -
修改内容
vim sample.yaml

-
从节点加入
./kk add nodes -f sample.yaml

本文介绍如何使用KubeKey部署Kubernetes集群及Kubesphere管理平台的过程,包括安装必要软件、设置时区、安装chrony同步时间等步骤,并详细说明了主节点和从节点的具体配置方法。
1747

被折叠的 条评论
为什么被折叠?



