<p>I am writing a client that manages Kubernetes objects. Is it possible to update <code>ReplicaSet</code>s using a Java client?</p>

Dima Kovbasa
<p>Yes, you can update ReplicaSet using Java Kubernetes Client. Depending on which Kubernetes client you use here are the code snippets.</p>
<hr />
<h3><a href="https://github.com/kubernetes-client/java" rel="nofollow noreferrer">Kubernetes Java Client</a></h3>
<pre class="lang-java prettyprint-override"><code>AppsV1Api api = new AppsV1Api();
api.patchNamespacedReplicaSet(...);
</code></pre>
<hr />
<h3><a href="https://github.com/fabric8io/kubernetes-client" rel="nofollow noreferrer">Fabric8 Kubernetes &amp; OpenShift Java Client</a></h3>
<pre class="lang-java prettyprint-override"><code>KubernetesClient client = new DefaultKubernetesClient();
client.apps().replicaSets().createOrReplace(...);
</code></pre>
