0%

k3s

master

1
2
3
4
5
6
7
8
hostnamectl set-hostname master
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
systemctl start docker
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION=v1.25.16+k3s4 sh -
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.1/kubesphere-installer.yaml
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.1/cluster-configuration.yaml
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
cat /var/lib/rancher/k3s/server/node-token

worker

1
2
3
4
hostnamectl set-hostname worker1
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
systemctl start docker
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION=v1.25.16+k3s4 K3S_URL=https://192.168.50.233:6443 K3S_TOKEN=K1053cd1df05427f26a1896a4293384beef1f5c75dd88fa890d5ff61309cdcd8db1::server:9df8472964caca47444865fa7d39517e sh -