feat(k3s): add node taints configuration and update documentation

这个提交包含在:
rohow
2026-02-10 13:29:37 +08:00
未验证
父节点 4a7b95fd22
当前提交 751a4693d5
修改 4 个文件,包含 47 行新增0 行删除
+25
查看文件
@@ -98,6 +98,31 @@ kubectl get nodes
| `enable_lb` | bool | - | 启用 K3s LB |
| `netfilter_mode` | string | "" | Tailscale netfilter: off/nodivert/on |
| `node_labels` | dict | - | 自定义标签 |
| `node_taints` | list | - | 节点污点 (格式: key=value:effect) |
### 节点污点示例
```yaml
masters:
hosts:
master1:
ansible_host: 10.0.0.1
node_taints:
- "node-role.kubernetes.io/control-plane:NoSchedule"
- "dedicated=gpu:NoSchedule"
agents:
hosts:
gpu-node:
ansible_host: 10.0.0.10
node_taints:
- "nvidia.com/gpu:NoSchedule"
```
常用污点效果(Effect):
- **NoSchedule**: 不允许新 Pod 调度到此节点
- **PreferNoSchedule**: 尽量不调度(软限制)
- **NoExecute**: 驱逐已有 Pod 并禁止新 Pod
| `kubelet_reserved` | string | - | 资源预留: cpu=500m,memory=512Mi |
## 环境变量