docs: 完善 03-05 本地存储文档与 local-path demo

- 落地路径查询优先 spec.local.path,兼容 hostPath
- local-path demo 增加 nodeSelector 固定节点

Made-with: Cursor
This commit is contained in:
2026-03-24 06:21:10 +08:00
parent be97836e0d
commit a67788de56
3 changed files with 211 additions and 144 deletions

View File

@@ -27,6 +27,8 @@ spec: # Deployment 的期望状态副本数、选择器、Pod 模板等)
labels: # Pod 标签:必须与 selector.matchLabels 对齐
app: nginx-local-pvc-demo # Pod 模板 label必须与 selector.matchLabels 对上
spec: # Pod 规范
nodeSelector: # 指定调度节点(本地盘绑定节点;请按实际节点主机名修改)
kubernetes.io/hostname: ylc61 # 仅调度到主机名为 ylc61 的节点
containers: # 容器列表
- name: nginx # 容器名
image: nginx:alpine # nginx 镜像