<p>I have an deployment.yml file with one container, something like this:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
[...]
    spec:
      containers:
        - name: my-app
          image: acr/my-app:1.0 #-&gt; should be completly overridden!
</code></pre>
<p>and an Azure DevOps job that does a dock build/push and should than deploy my app:</p>
<pre><code>variables:
  imageRepository: 'my-app'
  containerRegistry: 'acr'
  dockerfilePath: '$(Build.SourcesDirectory)/myapp/Dockerfile'
  tag: '$(Build.BuildId)'

[...]

- task: KubernetesManifest@0
      displayName: Deploy on kubernetes cluster
      inputs:
        action: 'deploy'
        kubernetesServiceConnection: '...'
        namespace: 'default'
        manifests: '$(Build.SourcesDirectory)/deployment.yml'
        containers: |
          $(containerRegistry)/$(imageRepository):$(tag)
</code></pre>
<p>I want the complete image reference value in the deployment.yml to be overridden. But I don't get how to write a working placeholder. I tried many different things, from <code>$(VALUE)</code> over <code>VALUE</code> to ``{{ VALUE }} ,e.g:</p>
<p><code>image: ${{ variables.containerRegistry }} / ${{ variables.imageRepository }} : ${{ variables.tag}}</code>. But the placeholder is not replaced at all and the pod fails with invalid image refernece.</p>
<p>Can Azure DevOps do this or do I need to override the image value via bash task or something like this?</p>
<p><strong>Update</strong></p>
<p>To clarify my requirements:
I want to override the complete string, since I want to reuse the file for multiple stages, where only the registry  the tag are difficult. E.g.: <code>acr1/my-app:tag1</code> and <code>acr2/my-app:tag2</code></p>

Chris
<p>taken from <a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/kubernetes-manifest?view=azure-devops" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/kubernetes-manifest?view=azure-devops</a></p>
<pre><code>The fully qualified URL of the image to be used for substitutions on the manifest files. This input accepts the specification of multiple artifact substitutions in newline-separated form. Here's an example:

containers: |
  contosodemo.azurecr.io/foo:test1
  contosodemo.azurecr.io/bar:test2

In this example, all references to contosodemo.azurecr.io/foo and contosodemo.azurecr.io/bar are searched for in the image field of the input manifest files. For each match found, the tag test1 or test2 replaces the matched reference.
</code></pre>
<p>You will need to ensure that the string in your manifest matches the registry/image:tag string in your KubernetesManifestTask</p>
<p>Azure DevOps fill wine the matching registry/image and update the tag portion</p>
