【问题标题】:Hot to set port number for Azure Kubernetes Dashboard?为 Azure Kubernetes 仪表板设置端口号很热门?
【发布时间】:2020-07-16 19:01:57
【问题描述】:

我正在尝试使用 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 仪表板?

【问题讨论】:

    标签: azure azure-aks


    【解决方案1】:

    经过一些尝试,我想通了,但我在 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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-08-30
      • 2020-02-17
      • 1970-01-01
      • 2020-05-02
      • 2019-12-25
      • 1970-01-01
      • 2019-07-21
      相关资源
      最近更新 更多