How to access/expose kubernetes-dashboard service outside of a cluster?

后端 未结 7 1468
终归单人心
终归单人心 2020-12-02 18:54

I have got the following services:

ubuntu@master:~$ kubectl get services --all-namespaces
NAMESPACE     NAME                   CLUSTER-IP      EXTERNAL-IP            


        
7条回答
  •  醉梦人生
    2020-12-02 19:20

    Using terminal app on my laptop did the following:

    sudo ssh  -i “MYAMOZONHOSTKEYPAIR.pem" -L 8001:127.0.0.1:8001 ubuntu@MYAMAZONHOST
    

    MYAMAZONHOST is where I am running k3s.

    Upon SSH did the following:

    sudo k3s kubectl proxy
    

    Then using the browser opened the url http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

    Kubernetes dashboard opened successfully.

提交回复
热议问题