<p>Why write <em>non-secret</em> metadata as <code>PLACEHOLDER</code> in kubernetes yaml files? (from <a href="https://stackoverflow.com/questions/72322737/yaml-placeholders-with-kubectl">here</a>):</p>
<pre><code>namespace: PLACEHOLDER
</code></pre>
<p>Any reason to replace it with a later <code>sed</code> command? why not simply write it inside the yaml file?</p>

OrenIshShalom
<p>Those values are normally replaced or overridden later, either by sed within a CI/CD pipeline like Jenkins, or (as indicated by the question you linked to) by Helm.</p>
<p>With helm, you can override values within the yamls either with a second yaml, or at the command line using <code>--set</code> switches.</p>
<p>So I could have</p>
<p><code>helm install nginx --values values.yaml --values values2.yaml</code></p>
<p>and the placeholder value in <code>values.yaml</code> would get overridden by the value in <code>values2.yaml</code></p>
<p>Placeholders are often used to deliberately break an install is someone tries to install it without passing in the right <code>values.yaml</code></p>
<p>For example:</p>
<p><code>helm install my-chart</code></p>
<p>Could break because of the placeholder value, but</p>
<p><code>helm install my-chart --values production.values.yaml</code></p>
<p>would install because the placeholder values are overridden and the chart can install correctly.</p>
