0

I have a kubernetes cluster running in azure on 3 centos7 machines. I'm treating those machines as a bare-metal cluster to do some test. I'm using kubeadm for spinning the cluster. Now my question is how can I see the kubernetes UI in my localmachine for the cluster running in azure private n/w. I have the cluster running and nodes registered which I can see in centos7 terminal by running "kubectl get-nodes".

Any insights would be helpful, please shed some light on how to get that work.

Thx, Arun

kick07
  • 614
  • 1
  • 8
  • 19

2 Answers2

2

You have a cluster up and running.Now if you want to access the kubernetes-dashboard which is part of kube-system namespaces.Apply following commands to access the dashboard.

kubectl get pods -n kube-system 

You will copy the name of the pod of kubernetes-dashboard and replace it with the following command

 kubectl -n kube-system port-forward NAME-OF-k8s-Dashboard-POD 9090:9090

It will create TCP-Proxy and you can access it on http://localhost:9090

There is another way to access the dashboard

you can use following command

kubectl proxy --port=8001

Now you can access it on http://localhost:8001/ui

Suresh Vishnoi
  • 17,341
  • 8
  • 47
  • 55
0

how can I see the kubernetes UI in my localmachine for the cluster running in azure private n/w.

We can use Azure CLI 2.0 to make a remote connection to Azure kubernetes.

First, we should install kubectl:

az acs kubernetes install-cli

Then download cluster credentials:

az acs kubernetes get-credentials --resource-group=<cluster-resource-group> --name=<cluster-name>

Then we can use kubectl command to get k8s information, like kubectl get nodes.

After connect to Azure k8s, we can launch the kubernetes web UI with this command:

az acs kubernetes browse -g [Resource Group] -n [Container service instance name]

Like this:

enter image description here

More information about make a remote connection to Azure ACS K8S, please refer to this link.

More information about using the kubernetes web UI with Azure container service, please refer to this article.

Hope this helps.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25