对齐文件规范

This commit is contained in:
2026-03-27 16:58:41 +08:00
parent 231b6713c4
commit 31709425e2
235 changed files with 5433 additions and 2850 deletions

View File

@@ -2,6 +2,14 @@
> 为 K3s 内置 Traefik 增加 **自定义 entrypoints**(额外暴露端口),用于多入口/旁路调试/特定设备转发等场景。
## TL;DR
- **自动化验收**`./scripts/verify.sh run 03-10`
- **关键前置**:按本文「前置条件」准备环境变量/Secret/入口 IP
- **成功判据**:达到本文「预期」且 playbook 断言通过
- **排障**:见本文「排障」
## 前置条件
- 已完成 `01-01-k3s-控制节点含traefik.md`,集群内 `kube-system` 命名空间的 Traefik 正常运行。
@@ -11,9 +19,9 @@
| 项 | 路径 |
|----|------|
| Traefik 自定义端口HelmChartConfig | [`ansible/files/03-10-traefik-custom-ports/traefik-custom-ports.yaml`](../ansible/files/03-10-traefik-custom-ports/traefik-custom-ports.yaml) |
| 应用 | `kubectl apply -f ansible/files/03-10-traefik-custom-ports/traefik-custom-ports.yaml` |
| 删除 | `kubectl delete -f ansible/files/03-10-traefik-custom-ports/traefik-custom-ports.yaml` |
| Traefik 自定义端口HelmChartConfig | [`ansible/files/03-10/traefik-custom-ports.yaml`](../ansible/files/03-10/traefik-custom-ports.yaml) |
| 应用 | `kubectl apply -f ansible/files/03-10/traefik-custom-ports.yaml` |
| 删除 | `kubectl delete -f ansible/files/03-10/traefik-custom-ports.yaml` |
## 做了什么
@@ -27,7 +35,7 @@
## 部署与验证
```bash
kubectl apply -f ansible/files/03-10-traefik-custom-ports/traefik-custom-ports.yaml
kubectl apply -f ansible/files/03-10/traefik-custom-ports.yaml
# 等待 Traefik 重载(可能触发 rollout
kubectl -n kube-system rollout status deploy/traefik --timeout=180s
@@ -51,3 +59,8 @@ kubectl -n kube-system describe svc traefik | sed -n '/Ports:/,/Selector:/p'
- `03-02-k3s-traefik-acme.md`
- `01-07-openwrt-haproxy.md`
## 排障
- **先看 playbook 输出**:失败时先定位是 deploy/wait/http_check 哪一步。
- **集群侧总览**`kubectl get nodes -o wide``kubectl -n kube-system get pods -o wide`
- **事件与日志**`kubectl -n <ns> describe ...``kubectl -n <ns> logs ... --tail=200`