k8wiz
Kustomize
Hard
Concepts

Which field path selects the value of the env var SERVICE_HOST in the container named app, for a replacement target?

Select your answer:

Show answer and explanation

Answer: spec.template.spec.containers.[name=app].env.[name=SERVICE_HOST].value

Explanation

Kustomize field paths use dots and select list items by a field value with [name=app], or every item with *. A replacement's options include delimiter and index, which let you replace one part of a value, such as the host in a URL.