Files
doc/k3d远程节点加入指南.md
2025-10-16 17:44:16 +08:00

38 lines
733 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 基于本地k3d创建的集群的远程节点加入操作指南
**准备工作**
1、远程节点主机安装k3s
```
curl -sfL https://get.k3s.io | sh -
```
-sfl可以不要
2、获取节点密钥node-token
一般k3d任意节点都有建议server节点查看
在/var/lib/rancher/k3s/server/node-token
**执行命令**
```
curl -sfL https://get.k3s.io | K3S_URL=https://<api-server-ip>:6443 K3S_TOKEN='<your-token>' sh -s - agent --node-name <node-name>
```
等待执行结束k3s-agent服务启动成功即可
tips:
执行命令这一步大概率需要梯子如果该节点主机自己配置了vpn那就再终端export一下就好
如果没有的话参考”利用反向隧穿使用宿主机vpn“