k3s agent
K3S_TOKEN是server端的,位于/var/lib/rancher/k3s/server/node-token下
cat /var/lib/rancher/k3s/server/node-token
在node节点执行命令,格式为
K3S_URL=${k3s_url} K3S_TOKEN=${k3s_token} ./install.sh
执行如下命令
K3S_TOKEN=xxxxxx K3S_URL=https://serverIP:6443 ./install.sh
启动失败,编辑配置文件/etc/systemd/system/k3s-agent.service
内容如下:
ExecStart=/usr/local/bin/k3s \
agent --docker