<p>I want to use <a href="https://github.com/kubernetes-client/java" rel="nofollow noreferrer">this</a> java client library for Kubernetes from app engine. But I ran into issues because this client library uses <code>okhttp</code> client which doesn't work in app engine as per this <a href="https://stackoverflow.com/questions/30912029/using-okhttp-client-via-okclient-on-google-app-engine-throws-a-java-lang-noclas">link</a>. </p>

<p>The error described in the previous SO link is the exact error I am getting on app engine. 
As per this <a href="https://github.com/mapbox/mapbox-java/issues/343" rel="nofollow noreferrer">link</a>, <code>okhttp</code> exposes the method which can be over-ridden such that this issue isn't seen. There is actually a library for this <a href="https://github.com/apkelly/GoogleAppEngineOkHttp" rel="nofollow noreferrer">here</a>. But the issue is that the <code>OkHttpClient</code> has been moved from package <code>com.squareup.okhttp</code> to <code>okhttp3</code> from version 3.x onwards in which the changes that I require are present. This old version of <code>okhttp</code> is used in the Kubernetes client library and shows error if I try to set the new okhttp. </p>

<p>Is there any way to solve this issue? Or are there any other client libraries which can be used from app engine. I know of client from <a href="https://github.com/fabric8io/kubernetes-client" rel="nofollow noreferrer">fabric8</a> but it has support only till kubernetes version 1.7.10 as of now. I still haven't tried it on app engine though.</p>

<p>Edit:</p>

<p>Even the fabric8 client has the same issue in app engine. It is trying to get the <code>ProxySelector</code> which is not a whitelisted class in appengine.</p>

Sudarshan Murthy
<p>Alternatively, you could try the Java 8 runtime where you can use all the standard Java library, unlike the Java 7 runtime which allows only select whitelisted JRE classes. After all, the Java 7 runtime is now deprecated: <a href="https://cloud.google.com/appengine/docs/standard/java/runtime" rel="nofollow noreferrer">https://cloud.google.com/appengine/docs/standard/java/runtime</a></p>

<p>However, do note that there are some differences, so you may want to take a look at the migration guide: <a href="https://cloud.google.com/appengine/docs/standard/java/migrating-to-java8" rel="nofollow noreferrer">https://cloud.google.com/appengine/docs/standard/java/migrating-to-java8</a></p>
