Kustomize
Medium
Mutation
When is a JSON 6902 patch a better choice than a strategic merge patch?
Select your answer:
Show answer and explanation
Answer: When strategic merge can't express it, like removing one string from a list
Explanation
JSON 6902 patches use explicit operations such as add, remove and replace at a path like /spec/template/spec/containers/0/args/1. They're precise but depend on list positions. Custom resources often need them too, because strategic merge has no merge keys for their lists.
More medium Kustomize questions
- A patch target sets kind: Deployment and labelSelector: tier=backend. Which resources does the patch change?
- What are Kustomize components for?
- Which field replaces the deprecated vars for copying a value from one resource into another?
- How do you reference a base from a Git repository under resources?
- kustomize build fails because a patch file sits outside the kustomization's directory. What does the default load restrictor require?
- How do you generate a TLS Secret with Kustomize?