26 lines
874 B
Markdown
26 lines
874 B
Markdown
K109668b353a17ff6ea9d68535255f880cf583c5c83c357d181ac5f963505033af4::server:f95b219abcfe507760f04ff88be52ccd
|
|
|
|
# Agent 节点安装命令
|
|
|
|
```sh
|
|
|
|
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_URL=https://kevisual.cn:6443 K3S_TOKEN=K109668b353a17ff6ea9d68535255f880cf583c5c83c357d181ac5f963505033af4::server:f95b219abcfe507760f04ff88be52ccd sh -s -- --pause-image=docker.1ms.run/rancher/mirrored-pause:3.9
|
|
|
|
```
|
|
会输出类似
|
|
```
|
|
[INFO] systemd: Enabling k3s-agent unit
|
|
Created symlink /etc/systemd/system/multi-user.target.wants/k3s-agent.service → /etc/systemd/system/k3s-agent.service.
|
|
[INFO] systemd: Starting k3s-agent
|
|
|
|
## 设置label
|
|
|
|
```sh
|
|
kubectl label nodes <node-name> machine=<value> --overwrite
|
|
```
|
|
|
|
```
|
|
kubectl label nodes kevisual machine=kevisual --overwrite
|
|
|
|
kubectl label nodes pro machine=pro --overwrite
|
|
``` |