<p>I am using Fabric8 Kubernetes Client library to for Java to create Kubernetes job, but the create method is shown as deprecated. I checked all the available docs and I don't see that its deprecated but IntelliJ IDE is showing as deprecated.</p>
<p>While searching for solution, I found out this link <a href="https://github.com/fabric8io/kubernetes-client/issues/3309" rel="nofollow noreferrer">https://github.com/fabric8io/kubernetes-client/issues/3309</a>. I used the same method as defined in the link but IDE still showing it as deprecated.</p>
<p>Here is the screenshot. I am using fabric8 version 6.0.0</p>
<p><a href="https://i.stack.imgur.com/dREiL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dREiL.png" alt="enter image description here" /></a></p>
<p>Kindly guide me how can I fix this deprecation issue.</p>

Muhammad Tariq
<p>Since Fabric8 v6, we've introduced a new <code>resource(T item)</code> DSL method which recieves the resource which is supposed to be operated on. You should be able to access all operations from here.</p>
<p>So, you need to change your code to this:</p>
<pre class="lang-java prettyprint-override"><code>Job job2 = client.batch().v1().jobs().inNamespace(&quot;default&quot;).resource(job).create();
</code></pre>
<p>You can read more about this in <a href="https://github.com/fabric8io/kubernetes-client/blob/master/doc/MIGRATION-v6.md#deprecations" rel="nofollow noreferrer">Fabric8 v6 Migration guide</a>.</p>
