<p>An earlier version of my deployment in K8s had <code>"${PROJECT_NAME}"</code> as a label value in preferredDuringSchedulingIgnoredDuringExecution.</p>

<p>I realized my mistake and the value is now changed to "api". So far so good. </p>

<p>The problem starts I scale my node pool to more than one node. Then I get this error:</p>

<pre><code>invalid label value: "${PROJECT_NAME}": at key: "app": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
</code></pre>

<p>It seems like the old value is still stored somewhere in the system. I have therefore checked all the YAML's and none have the wrong value in it anymore.</p>

<p>What can I do?</p>

<p>PS: I'm using helm for deploying those YAML's</p>

Max Moeschinger
<p>You haven't provided the details if you are redeploying your Helm charts, but it sounds like you are redeploying after the node pool is scaled and the <code>${PROJECT_NAME}</code> substitution is not happening before deployment.</p>

<p>I would recommend finding out where <code>${PROJECT_NAME}</code> is in your Helm chart and just substitute it with just <code>api</code> and see if that's the issue. Then go back and find out if maybe (?) you are using bash (or some shell to deploy) and <code>${PROJECT_NAME}</code> is missing from your environment (?).</p>
