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.
Running minikube start
will automatically configure kubectl
.
You can run minikube ip
to get the IP that your minikube is on. The API server runs on 8443 by default.
Update: To access the API server directly, you'll need to use the custom SSL certs that have been generated. by minikube. The client certificate and key are typically stored at: ~/.minikube/apiserver.crt
and ~/.minikube/apiserver.key
. You'll have to load them into your HTTPS client when you make requests.
If you're using curl
use the --cert
and the --key
options to use the cert and key file. Check the docs for more details.
Update2: The client certificate and key are typically stored at: ~/.minikube/profiles/minikube
directory when you use the version >= 0.19
(more informations). You probably need to set the --insecure
options to the curl client because of the self-signed certificate.