<p>For a Kubernetes deployment, given a Kustomize Base like:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
...
images:
  - name: developmentregistry.com/myimage:v1.0
</code></pre>
<p>Is there a way to change only the image registry and retain the o.g. tag with an Overlay <strong>without re-declaring the image</strong> using image transformers?</p>
<p>For example if I use an Overlay like:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
...
images:
  - newName: productionregistry.com/myimage
</code></pre>
<p>The image is deployed as just <code>productionregistry.com/myimage</code>— which is not what I want.<br />
How can I make it so my Overlay deployment yields <code>productionregistry.com/myimage:v1.0</code>? I cannot find any other posts or any issues about this.<br />
Would I have to use Patches instead of image transformers?</p>

<p>Okay I figured it out — Kustomization Yamls are finnicky so you <em>must</em> have the right yaml structure.</p>
<p>This works:</p>
<p><strong>Base</strong></p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
...
images:
  - name: developmentregistry.com/myimage
    newTag: v1.0

</code></pre>
<p><strong>Overlay</strong></p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
...
images:
  - name: developmentregistry.com/myimage
    newName: productionregistry.com/myimage
</code></pre>
