k8wiz
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.