<p>Is there any way to pass image version from a varibale/config when passing a manifest .yaml to kubectl command</p>

<p>Example : </p>

<pre><code>apiVersion: v1
kind: ReplicationController
metadata:
  name: nginx
spec:
  replicas: 1
  selector:
    app: nginx
  template:
    metadata:
      name: nginx
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:${IMAGE_VERSION}
        imagePullPolicy: Always
        resources:
         limits:
           cpu: "1.2"
           memory: 100Mi
        ports:
        - containerPort: 80
</code></pre>

<p>Use case is to launch specific image version which is set at kubernetes level, and that the variable is resolved by kubernetes itself at server side.</p>

<p>Thanks and Regards,
Ravi</p>

<p>k8s manifest files are static yaml/json.</p>

<p>If you would like to template the manifests (and manage multiple resources in a bundle-like fashion), I strongly recommend you to have a look at <a href="https://github.com/kubernetes/helm" rel="noreferrer">Helm</a></p>

<p>I've recently created <a href="https://github.com/cloud-native-singapore/helm-workshop#templating-and-release-management" rel="noreferrer">a Workshop which focuses precisely on the "Templating" features of Helm</a>.</p>

<p>Helm does a lot more than just templating, it is built as a full fledged package manager for Kubernetes applications (think Apt/Yum/Homebrew).</p>

<p>If you want to handle everything client side, have a look at <a href="https://github.com/errordeveloper/kubegen" rel="noreferrer">https://github.com/errordeveloper/kubegen</a></p>

<p>Although, at some point, you will need the other features of Helm and a migration will be needed when that time comes - I recommend biting the bullet and going for Helm straight up.</p>
