[英]Hot to set port number for Azure Kubernetes Dashboard?
I am trying to spawn the Azure Kubernetes Dashboard, using the indications found in the azure AKS "View Kubernetes Dashboard".
特別是我得到
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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.