<p>I am getting "extension (5) should not be presented in certificate_request" when trying to run locally a Java Kubernetes client application which queries the Kubernetes cluster over a lube proxy connection. Any thoughts? Thanks in advance</p>

<pre><code>  ApiClient client = null;
    try {
        client = Config.defaultClient();
        //client.setVerifyingSsl(false);
    } catch (IOException e) {
        e.printStackTrace();
    }
    Configuration.setDefaultApiClient(client);

    CoreV1Api api = new CoreV1Api();
    V1PodList list = null;
    try {
        list = api.listPodForAllNamespaces(null, null, null, null, null, null, null, null, null);
    } catch (ApiException e) {
        e.printStackTrace();
    }
    for (V1Pod item : list.getItems()) {
        System.out.println(item.getMetadata().getName());
    }
</code></pre>

Alexander F
<p>Which version of Java are you using?</p>

<p>JDK 11 onwards have support for TLS 1.3 which can cause the error <code>extension (5) should not be presented in certificate_request</code>.</p>

<p>Add <code>-Djdk.tls.client.protocols=TLSv1.2</code> to the JVM args to make it use <code>1.2</code> instead.</p>

<p>There is an issue on Go lang relating to this <a href="https://github.com/golang/go/issues/35722" rel="noreferrer">https://github.com/golang/go/issues/35722</a> and someone there also posted to <a href="https://github.com/golang/go/issues/35722#issuecomment-571173416" rel="noreferrer">disable TLS 1.3 on the Java side</a></p>
