<p>What is correct way to kubernetes cluster setup using minikube through the kubernetes api ?
At the moment, I can't find a port through which the kubernetes cluster can be accessed.</p>

<p>The easiest way to access the Kubernetes API with when running minikube is to use</p>

<pre><code>kubectl proxy --port=8080
</code></pre>

<p>You can then access the API with</p>

<pre><code>curl http://localhost:8080/api/
</code></pre>

<p>This also allows you to browse the API in your browser.  Start minikube using</p>

<pre><code>minikube start --extra-config=apiserver.Features.EnableSwaggerUI=true
</code></pre>

<p>then start <code>kubectl proxy</code>, and navigate to <a href="http://localhost:8080/swagger-ui/" rel="noreferrer">http://localhost:8080/swagger-ui/</a> in your browser.</p>

<p>You <em>can</em> access the Kubernetes API with curl directly using</p>

<pre><code>curl --cacert ~/.minikube/ca.crt --cert ~/.minikube/client.crt --key ~/.minikube/client.key https://`minikube ip`:8443/api/
</code></pre>

<p>but usually there is no advantage in doing so.  Common browsers are not happy with the certificates minikube generates, so if you want to access the API with your browser you need to use <code>kubectl proxy</code>.</p>
