<p>We are experimenting with Kubernetes. Already have developed bunch of Spring boot Microservices which are ready to be integrated with kubernetes. </p>

<p>We would like to keep dev environment (local) simple and not complicate developers with running local kubernetes clusters/ building images etc. </p>

<ol>
<li>Is there any solution to access Kubernetes config-map/secrets outside of its cluster?</li>
<li>Is there any way to discover services running in a Kubernetes cluster in a standalone spring boot Microservice app??</li>
</ol>

<p>Thanks in advance!
A</p>

<p>Kubernetes relies on its API servers for all operations. You can use <a href="https://kubernetes.io/docs/api-reference/v1.8/#-strong-api-overview-strong-" rel="nofollow noreferrer">this API</a> to query/do anything within Kubernetes.</p>

<ol>
<li><p>Get a configmap with the API: <code>GET /api/v1/namespaces/{namespace}/configmaps/{name}</code></p></li>
<li><p>List all the services: <code>GET /api/v1/namespaces/{namespace}/services/</code></p></li>
</ol>

<p>How you access the API will depend on your particular setup but you can test it quickly by running <code>kubectl proxy</code> and just using <code>curl</code> in localhost.</p>
