Difference between revisions of "Accessing a Kubernetes cluster"

From MyWiki
Jump to: navigation, search
Line 10: Line 10:
  
 
$ minikube dashboard <br>
 
$ minikube dashboard <br>
$ kubectl proxy
+
$ kubectl proxy <br>
 +
 
 +
When kubectl proxy is running, we can send requests to the API over the localhost on the proxy port 8001 (from another terminal, since the proxy locks the first terminal): <br>
 +
 
 +
$ curl http://localhost:8001/ <br>

Revision as of 22:09, 21 September 2019

We access a Kubernetes cluster by three methods:

  • kubectl, the CLI tool
  • Kubernetes Dashboard
  • curl with the right credentials to access the cluster via APIs

$ kubectl config view
$ kubectl cluster-info
$ kubectl cluster-info dump


$ minikube dashboard
$ kubectl proxy

When kubectl proxy is running, we can send requests to the API over the localhost on the proxy port 8001 (from another terminal, since the proxy locks the first terminal):

$ curl http://localhost:8001/