Demo:检查 Kubernetes YAML 中的容器镜像
镜像路径是常见发布风险。YAML path 预览可以在 manifest 进入集群前确认会部署哪些 tag。
- 检查所有 containers,不只第一个。
- 生产 manifest 中注意 latest 和可变 tag。
- 把 image tag 和 CI/CD 发布版本对齐。
spec.template.spec.containers[*].image
---
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
- name: api
image: ghcr.io/acme/api:2026.06.18