A kustomization contains:
resources:
- deployment.yaml
namePrefix: dev-
images:
- name: nginx
newTag: "1.27"deployment.yaml defines a Deployment named web using nginx:1.25. What does kubectl kustomize output?
- A.
A Deployment named
webthat usesnginx:1.27, because prefixes only apply to Services. - B.
A Deployment named
dev-webthat still usesnginx:1.25. - C.
An error, because
imagesis not a valid field. - D.
A Deployment named
dev-webthat usesnginx:1.27.
Show answer and explanation
Answer: D
namePrefix prefixes the names of all resources (and updates references), and images transforms image names and tags.
- Prefixes apply to every resource kind.
- The images transformer replaces the tag.
imagesis a standard Kustomize field.