<p>I'm attempting to add some <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/" rel="nofollow noreferrer">recommended labels</a> to several k8s resources, and I can't see a good way to add labels for things that would change frequently, in this case &quot;app.kubernetes.io/instance&quot; and &quot;app.kubernetes.io/version&quot;. Instance seems like a label that should change every time a resource is deployed, and version seems like it should change when a new version is released, by git release or similar. I know that I could write a script to generate these values and interpolate them, but that's a lot of overhead for what seems like a common task. I'm stuck using Kustomize, so I can't just use Helm and have whatever variables I want. Is there a more straightforward way to apply labels like these?</p>

<p>Kustomize's <code>commonLabels</code> transformer is a common way to handle this, sometimes via a component. It really depends on your overall layout.</p>
