title: How to update services in Kubernetes?
body: <p><strong>Background:</strong></p>
  
  <p>Let's say I have a replication controller with some pods. When these pods were first deployed they were configured to expose port 8080. A service (of type LoadBalancer) was also create to expose port 8080 publicly. Later we decide that we want to export an additional port from the pods (port 8081). We change the pod definition and do a rolling-update with no downtime, great! But we want this port to be publicly accessible as well.</p>
  
  <p><strong>Question:</strong></p>
  
  <p>Is there a good way to update a service without downtime (for example by adding a an additional port to expose)? If I just do:</p>
  
  <pre><code>kubectl replace -f my-service-with-an-additional-port.json
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <pre><code>Replace failedspec.clusterIP: invalid value '': field is immutable
  </code></pre>