如何在未打开的情况下使用代理服务器访问端口 8001?

How can I access port 8001 with a proxy server even when it's not open?

所以我做了以下事情:

minikube dashboard    
kubectl proxy

它说 Starting to serve on 127.0.0.1:8001,但是这个端口在我的 VM 上没有打开(不包括在我的防火墙规则中)

那我怎样才能通过 ssh 隧道访问它呢?

基本上我是这样做的:

ssh -L 12345:localhost:8001 myLogin@myRemoteServer

然后访问为:

http://localhost:12345/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/#/pod?namespace=default

我觉得这很有用kubectl proxy --address='0.0.0.0' --disable-filter=true