### 1. 安装sealos - [官网](https://www.sealyun.com/zh-Hans/docs/lifecycle-management/quick-start/installation) ```bash wget https://github.com/labring/sealos/releases/download/v4.2.0/sealos_4.2.0_linux_amd64.tar.gz && tar zxvf sealos_4.2.0_linux_amd64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin ``` ### 2. 部署单节点k8s - [官网](https://www.sealyun.com/zh-Hans/docs/lifecycle-management/quick-start/) ```bash # sealos version must >= v4.1.0 $ sealos run labring/kubernetes:v1.27.13 labring/helm:v3.8.2 labring/calico:v3.24.1 --single ``` ### 3. 部署多节点k8s ```bash sealos run labring/kubernetes:v1.27.4 labring/helm:v3.8.2 labring/calico:v3.24.1 \ --masters 192.168.110.20 \ --nodes 192.168.110.25,192.168.110.26,192.168.110.27 -p Sunqi0220. ``` ```bash # 阿里云镜像 sealos run registry.cn-hangzhou.aliyuncs.com/idevops/kubernetes:v1.27.4 \ registry.cn-hangzhou.aliyuncs.com/idevops/helm:v3.8.2 \ registry.cn-hangzhou.aliyuncs.com/idevops/calico:v3.24.1 \ --masters 192.168.0.20 \ --nodes 192.168.0.25,192.168.0.26 -p Sunqi0220. ``` ### 4. 添加master节点 ```bash sealos add --masters 192.168.110.21,192.168.110.22 ``` ### 5. 添加worker节点 ```bash sealos add --nodes 192.168.110.28,192.168.110.29 ```