Files
Deploy-Laboratory/ansible/files/01-02/k3s-agent-join.example.sh
2026-03-29 09:08:01 +08:00

18 lines
500 B
Bash
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.
#!/usr/bin/env bash
# 工作节点加入 k3s示例— ansible/files/01-02/
# 详见docs/01-02-k3s-工作节点.md
# 方案一:默认数据目录
# curl -sfL https://get.k3s.io | \
# K3S_URL=https://192.168.2.61:6443 \
# K3S_TOKEN=<TOKEN> \
# sh -
# 方案二:数据盘
# curl -sfL https://get.k3s.io | sh -s - agent \
# --data-dir=/storage \
# --server https://192.168.2.61:6443 \
# --token <TOKEN>
echo "[INFO] 将占位符替换为控制面地址与 token 后执行。"