为 Azure Kubernetes 仪表板设置端口号很热门?
Hot to set port number for Azure Kubernetes Dashboard?
我正在尝试使用 azure AKS 中的指示生成 Azure Kubernetes 仪表板
“查看 Kubernetes 仪表板”。
特别是我得到
az aks browse --resource-group my-resource-group --name aks-name-westeurope-001
默认情况下,它会将端口重定向到端口 8001,不幸的是,该端口已被使用,所以我得到
F0716 12:08:13.743013 11860 proxy.go:160] listen tcp 127.0.0.1:8001: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
如何更改端口以便我可以登录到我的 kubernetes 仪表板?
经过一些尝试我弄明白了,但是我在 SO 上找不到类似的东西,所以我把我的解决方案复制到这里。
如果我 运行 az aks browse --help
我得到以下指示
Command
az aks browse : Show the dashboard for a Kubernetes cluster in a web browser.
Arguments
--name -n [Required] : Name of the managed cluster.
--resource-group -g [Required] : Name of resource group. You can configure the default group
using `az configure --defaults group=<name>`.
--disable-browser : Don't launch a web browser after establishing port-forwarding.
Add this argument when launching a web browser manually, or for automated testing.
--listen-address : The listening address for the dashboard. Default: 127.0.0.1.
Add this argument to listen on a specific IP address.
--listen-port : The listening port for the dashboard. Default: 8001.
Add this argument when the default listening port is used by another process or unavailable.
Global Arguments
--debug : Increase logging verbosity to show all debug logs.
--help -h : Show this help message and exit.
--only-show-errors : Only show errors, suppressing warnings.
--output -o : Output format. Allowed values: json, jsonc, none, table, tsv,
yaml, yamlc. Default: json.
--query : JMESPath query string. See http://jmespath.org/ for more
information and examples.
--subscription : Name or ID of subscription. You can configure the default
subscription using `az account set -s NAME_OR_ID`.
--verbose : Increase logging verbosity. Use --debug for full debug logs.
这意味着 运行 我的带有额外参数 --listen-port
的命令可以解决问题
az aks browse --resource-group my-resource-group --name aks-name-westeurope-001 --listen-port 10000
我正在尝试使用 azure AKS 中的指示生成 Azure Kubernetes 仪表板 “查看 Kubernetes 仪表板”。
特别是我得到
az aks browse --resource-group my-resource-group --name aks-name-westeurope-001
默认情况下,它会将端口重定向到端口 8001,不幸的是,该端口已被使用,所以我得到
F0716 12:08:13.743013 11860 proxy.go:160] listen tcp 127.0.0.1:8001: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
如何更改端口以便我可以登录到我的 kubernetes 仪表板?
经过一些尝试我弄明白了,但是我在 SO 上找不到类似的东西,所以我把我的解决方案复制到这里。
如果我 运行 az aks browse --help
我得到以下指示
Command
az aks browse : Show the dashboard for a Kubernetes cluster in a web browser.
Arguments
--name -n [Required] : Name of the managed cluster.
--resource-group -g [Required] : Name of resource group. You can configure the default group
using `az configure --defaults group=<name>`.
--disable-browser : Don't launch a web browser after establishing port-forwarding.
Add this argument when launching a web browser manually, or for automated testing.
--listen-address : The listening address for the dashboard. Default: 127.0.0.1.
Add this argument to listen on a specific IP address.
--listen-port : The listening port for the dashboard. Default: 8001.
Add this argument when the default listening port is used by another process or unavailable.
Global Arguments
--debug : Increase logging verbosity to show all debug logs.
--help -h : Show this help message and exit.
--only-show-errors : Only show errors, suppressing warnings.
--output -o : Output format. Allowed values: json, jsonc, none, table, tsv,
yaml, yamlc. Default: json.
--query : JMESPath query string. See http://jmespath.org/ for more
information and examples.
--subscription : Name or ID of subscription. You can configure the default
subscription using `az account set -s NAME_OR_ID`.
--verbose : Increase logging verbosity. Use --debug for full debug logs.
这意味着 运行 我的带有额外参数 --listen-port
的命令可以解决问题
az aks browse --resource-group my-resource-group --name aks-name-westeurope-001 --listen-port 10000