环境准备
- 192.168.2.4,192.168.2.5
安装步骤
执行安装脚本
curl -sfL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn sh -
这台主机即是 k3s server 也是 k3s agent
加入节点
token:在master节点查看
curl -sfL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_URL=https://centos02:6443 K3S_TOKEN=K10a973870b232bf2e3d8577ea9db1386df74fa248e4436321c6d8fccf0c3425b5b::server:83607eecf066f52d9c2e181ee9990f1d sh -
- 看下结果
卸载
server卸载
/usr/local/bin/k3s-uninstall.sh
agent卸载
/usr/local/bin/k3s-agent-uninstall.sh