<p>As we know, fabric can connect Kubernetes via ~/.kube/config file. I am wondering how to use farbric8 connects to connect to the Kubernetes API within a Pod? Is there any fabric8 API/library support it?</p>

Joe
<p>I'm from Fabric8 team. Fabric8 Kubernetes Client automatically detects whether it's inside a Pod or outside.</p>
<ul>
<li><p>When inside the cluster, Fabric8 Kubernetes Client reads Kubernetes API token and ceritificates from ServiceAccount mounted inside the Pod(<code>/var/run/secrets/kubernetes.io/serviceaccount/</code>). Api server URL is determined by reading <code>KUBERNETES_SERVICE_HOST</code> environment variable.</p>
</li>
<li><p>When outside the cluster, it just reads <code>.kube/config</code> as usual.</p>
</li>
</ul>
<p>To end user, the process should be transparent. Just make sure your Pod's ServiceAccount has correct roles assigned to access some api group.</p>
<p>I had tested this some time ago on a demo project with minikube and it was working okay for me. You can try it out and see if it helps your use case: <a href="https://github.com/rohanKanojia/kubernetes-client-inside-pod" rel="nofollow noreferrer">https://github.com/rohanKanojia/kubernetes-client-inside-pod</a></p>
