对齐文件规范
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
|
||||
> 场景:nginx 落在控制节点(`nodeSelector: node-role.kubernetes.io/control-plane`),使用标准 Ingress 暴露 `/demo-m1`。整合于 `02-05-nginx-验证矩阵-一键部署.md`。
|
||||
|
||||
## TL;DR
|
||||
|
||||
- **自动化验收**:`./scripts/verify.sh run 02-01`
|
||||
- **你需要准备**:入口节点 `:80` 可达;(可选)`nginx_entry_base=http://<入口IP>` 用于脚本侧 HTTP 校验
|
||||
- **成功判据**:`/demo-m1/` 返回 `200` 且能区分后端(见本篇“验证命令/预期”与 playbook 断言)
|
||||
- **排障**:见本文「排障」
|
||||
|
||||
## 前置条件
|
||||
|
||||
- 已完成 `01-02-k3s-工作节点.md`
|
||||
@@ -14,12 +21,12 @@
|
||||
2. 创建 Middleware + Ingress(`/demo-m1` -> nginx-m1:80)
|
||||
3. 等待 Pod 与 Ingress 就绪
|
||||
|
||||
示例 YAML 见 `ansible/files/02-05-nginx-matrix/01-control-ingress.yaml`。
|
||||
示例 YAML 见 `ansible/files/02-05/01-control-ingress.yaml`。
|
||||
|
||||
## 部署命令
|
||||
|
||||
```bash
|
||||
kubectl apply -f ansible/files/02-05-nginx-matrix/01-control-ingress.yaml
|
||||
kubectl apply -f ansible/files/02-05/01-control-ingress.yaml
|
||||
```
|
||||
|
||||
## 验证命令
|
||||
@@ -37,10 +44,10 @@ curl -i --max-time 3 http://<入口节点IP>/demo-m1/
|
||||
## 删除
|
||||
|
||||
```bash
|
||||
kubectl delete -f ansible/files/02-05-nginx-matrix/01-control-ingress.yaml
|
||||
kubectl delete -f ansible/files/02-05/01-control-ingress.yaml
|
||||
```
|
||||
|
||||
## 失败排查
|
||||
## 排障
|
||||
|
||||
- 确认 Traefik 接管 Ingress、Service/Endpoint 正常
|
||||
- 参考 `06-01-k3s-networkpolicy-故障排查.md`
|
||||
|
||||
Reference in New Issue
Block a user