feat(k3s): add node taints configuration and update documentation
这个提交包含在:
@@ -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 |
|
||||
|
||||
## 环境变量
|
||||
|
||||
在新议题中引用
屏蔽一个用户