Products
...
Compute
Kubernetes Engine
How to access Kubernetes cluster dashboard
5 min
step 1 login to the controller node with the ssh key used while creating the kubernetes cluster you can log into the kubernetes cluster using following command ssh i \<ssh private key > p 2222 cloud@\<public ip address of virtual router> step 2 check the kubernetes dashboard service using the following command \# kubectl get servies all namespaces by default kubernetes dashboard service runs on cluster ip in order to access the kubernetes dashboard from the public ip, we need to create dashboard service with nodeport option step 3 delete the kubernetes dashboard service running on clusterip using following command \# kubectl delete services kubernetes dashboard n kubernetes dashboard step 4 create a new kubernetes dashboard service with the below yaml file using vi or nano editor \# kubernetes dashboard service yaml (file name) kind service apiversion v1 metadata labels k8s app kubernetes dashboard name kubernetes dashboard namespace kubernetes dashboard spec type nodeport ports \ port 443 targetport 8443 nodeport 30001 #this is outside port you can change it as per your need selector k8s app kubernetes dashboard after creating the above file, create kubernetes service using following command # kubectl apply f kubernetes dashboard service yaml step 5 check the kubernetes service now the service will be running on nodeport port number 30001 open the same port in the firewall on the portal & also created a port forwarding rule for the same from the portal as shown in the screenshot below step 6 once the firewall & port forwarding rules are created you will be able to access the kubernetes dashboard using following url from any browser https //\<public ip address of virtual router> 30001