<p>What is the clean way to deploy a <strong>pod</strong> using kubernetes client api in Java ?</p>

<blockquote>
  <p>import io.kubernetes.client.ApiClient;</p>
</blockquote>

Smaillns
<pre class="lang-java prettyprint-override"><code>import io.kubernetes.client.ApiClient;
import io.kubernetes.client.ApiException;
import io.kubernetes.client.Configuration;
import io.kubernetes.client.apis.CoreV1Api;
import io.kubernetes.client.models.V1Pod;
import io.kubernetes.client.models.V1PodList;
import io.kubernetes.client.util.Config;

import java.io.IOException;

public class Example {
    public static void main(String[] args) throws IOException, ApiException{
        ApiClient client = Config.defaultClient();
        Configuration.setDefaultApiClient(client);

        CoreV1Api api = new CoreV1Api();
        V1Pod podTemplate = init_pod;
        V1Pod pod = api.createNamespacedPod(pod creation arguments and podTemplate)
        System.out.println("pod status : " + pod.getStatus().getPhase());
    }
}
</code></pre>

<p>The above code might not be accurate. But this code might give you a gist of getting started. </p>

<p>A sample medium post that describes using java client of kubernetes is <a href="https://medium.com/programming-kubernetes/building-stuff-with-the-kubernetes-api-toc-84d751876650" rel="nofollow noreferrer">here</a></p>
