title: How to update a set of pods running in kubernetes?
body: <p>What is the preferred way of updating a set of pods (e.g. after making code changes &amp; pushing underlying docker image to docker hub) controlled by a replication controller in kubernetes cluster?</p>
  
  <p>I can see 2 ways:</p>
  
  <ol>
  <li>Deleting &amp; re-creating replication controller manually</li>
  <li>Using <code>kubectl rolling-update</code></li>
  </ol>
  
  <p>With the <code>rolling-update</code> I have to change the replication controller name. Since I'm storing replication controller definition in YAML file and not generating it manually, having to change the file to push out a code update seems to bring about bad habits like alternating between 2 names for the replication controller (e.g. controllerA and controllerB) to avoid name conflict.</p>
  
  <p>What is the better way?</p>