gpt4 book ai didi

azure - 热衷于为 Azure Kubernetes 仪表板设置端口号?

转载 作者:行者123 更新时间:2023-12-02 07:57:38 25 4
gpt4 key购买 nike

我正在尝试使用 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 browser --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 - 热衷于为 Azure Kubernetes 仪表板设置端口号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62933278/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com