<p>I have created a yaml file for kubernetes cluster 
which holds two docker images(2 micro services). created a cluster from it . 
<code>kubectl create -f pod.yaml</code>
Cluster is running now.</p>

<p>I wish to add another one new docker image(new micro services to get delpoyed) or remove an existing one docker image from that cluster.</p>

<p>Is it possible in the same cluster? </p>

<p>I would hold from going into the part where you said <code>which holds two docker images(2 microservices).</code> which might be a separate discussion and is more subjective.</p>

<p>You can add another container spec to your YAML and apply it:</p>

<pre><code>spec:
  containers:
  - name: container1
//.. more stuff
spec:
  containers:
  - name: container2
//.. more stuff
spec:
  containers:
  - name: container3    
</code></pre>

<p>But additionally define <code>deploymentStrategy</code> to be <code>RollingUpdateDeployment</code> so that not all pods are taken down at the same time and they are replaced in a controlled manner without affecting end-user traffic.</p>

<p>Of course if your two versions of the application (one with 2 containers and one with 3) are not compatible with rest of the system then this won't solve your problem.</p>

<p>In which case - it is best to stand up another deployment for new version of application and divert traffic using DNS/routing mechanisms to new version of application.</p>
