Describe the bug
This command used to work for me, but not recently even after I restarted the machine. This is the error message:
Proxy running on http://127.0.0.1:8001/
Press CTRL+C to close the tunnel...
Unable to listen on port 8001: All listeners failed to create with the following errors: Unable to create listener: Error listen tcp4 127.0.0.1:8001: bind: An attempt was made to access a socket in a
way forbidden by its access permissions., Unable to create listener: Error listen tcp6: address [[::1]]:8001: missing port in address
error: Unable to listen on any of the requested ports: [{8001 9090}]
The 8001 port seems to be occupied by the "System" process with process id 4. But I can't kill the process or close the connection.
To Reproduce
Simply run the command and it gives me the error.
Expected behavior
There are other available ports among [{8001 9090}], it should choose an available port or let me specify the port to use.
Environment summary
I'm using azure-cli (2.0.25) on Windows 10 Version 1709
same problem here.
would be nice to have a way to choose an alternate local port.
Found a workaround,
instead of az aks browse run:
kubectl proxy --port 8002
then navigate to:
http://127.0.0.1:8002/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/
Also have the same issue.
Might be the same issue with #6794
Use "--listen-port" to specify a customized port other than the default 8001.
It would be great if one could also override the host/ip that the browse command binds to. In some scenarios (e.g. in a docker container), it would be preferable to bind to 0.0.0.0
instead of 127.0.0.1
.
I have the same problem in my cluster
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.2", GitCommit:"cff46ab41ff0bb44d8584413b598ad8360ec1def", GitTreeState:"clean", BuildDate:"2019-01-13T23:15:13Z", GoVersion:"go1.11.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.4", GitCommit:"bf9a868e8ea3d3a8fa53cbb22f566771b3f8068b", GitTreeState:"clean", BuildDate:"2018-10-25T19:06:30Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
I have found that there was two kubernetes-dashboard
pods in the cluster one of them is Not related to kubernetes-dashboard
deployment, So I simply delete this pod and az aks browse
back to work again.
Found a workaround,
instead of az aks browse run:
kubectl proxy --port 8002
then navigate to:
http://127.0.0.1:8002/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/
How would I use this workaround with the Azure Cloud Shell, seeing as how this would not result in it running locally?
Found a workaround,
instead of az aks browse run:
kubectl proxy --port 8002
then navigate to:
http://127.0.0.1:8002/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/
How would I use this workaround with the Azure Cloud Shell, seeing as how this would not result in it running locally?
I tried but still not work with still the same permission error, what I did was on Cloud shell, I run 'kubectl proxy --port 8002'. And on my laptop, I run 'az aks browse --resource-group AKSK8ClusterRG --name K8Cluster --listen-port 8002'
You can now specify the listen-port for the browse
command:
az aks browse -n cluster-name -g resource-group-name --listen-port 8002
Found a workaround,
instead of az aks browse run:
kubectl proxy --port 8002
then navigate to:
http://127.0.0.1:8002/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/
this will not work in case you are trying from cloudshell, recommend - Use "--listen-port"
Most helpful comment
Found a workaround,
instead of az aks browse run:
kubectl proxy --port 8002
then navigate to:
http://127.0.0.1:8002/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/