 <p>One way of doing this is to perform a rolling upgrade. This will ensure that your deployed application incurs no downtime (new pods are started before old pods are stopped). One caveat is that you must be using a replication controller or replication set to do so. Most rolling deployments will simply involve just updating the container's image for the new version of software.</p> <p>You can do this through Java via <a href="http://fabric8.io" rel="nofollow">fabric8</a>'s <a href="https://github.com/fabric8io/kubernetes-client" rel="nofollow">Kubernetes Java client</a>. <a href="https://github.com/fabric8io/kubernetes-client/blob/a47d2e288599559069481895c8b6fc7cf3fbab3d/kubernetes-examples/src/main/java/io/fabric8/kubernetes/examples/FullExample.java#L147" rel="nofollow">Here</a>'s an example:</p> <pre><code>client.replicationControllers() .inNamespace("thisisatest") .withName("nginx-controller") .rolling().updateImage("nginx"); </code></pre> <p>You can change any configuration of the replication controller (replicas, environment variables, etc). The call will return when your pods running the new version are <code>Ready</code> &amp; the old replication &amp; pods have been stopped &amp; deleted.</p>