how to access local kubernetes minikube dashboard remotely

前端 未结 9 476
离开以前
离开以前 2021-01-30 14:46

Kubernetes newbie (or rather basic networking) question: Installed single node minikube (0.23 release) on a ubuntu box running in my lan (on IP address 192.168

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 15:24

    I reached this url with search keywords: minikube dashboard remote. In my case, minikube (and its dashboard) were running remotely and I wanted to access it securely from my laptop.

    [my laptop] --ssh--> [remote server with minikube]
    

    Following gmiretti's answer, my solution was local forwarding ssh tunnel:

    On minikube remote server, ran these:

    minikube dashboard
    kubectl proxy
    

    And on my laptop, ran these (keep localhost as is):

    ssh -L 12345:localhost:8001 myLogin@myRemoteServer
    

    The dashboard was then available at this url on my laptop:

    http://localhost:12345/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
    
    

提交回复
热议问题