Share via


az aks command

請參閱 'az aks command invoke', 'az aks command result' 中的詳細使用量。

命令

名稱 Description 類型 狀態
az aks command invoke

在 aks 叢集上執行殼層命令(使用 kubectl、helm),也支援附加檔案。

核心 GA
az aks command result

從先前觸發的 'aks 命令叫用' 擷取結果。

核心 GA

az aks command invoke

在 aks 叢集上執行殼層命令(使用 kubectl、helm),也支援附加檔案。

az aks command invoke --name
                      --resource-group
                      [--command]
                      [--file]
                      [--no-wait]

必要參數

--name -n

受控叢集的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--command -c

您想要執行的命令或殼層腳本。

--file -f

命令要使用的檔案,請使用 '.' 附加目前的資料夾。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az aks command result

從先前觸發的 'aks 命令叫用' 擷取結果。

az aks command result --name
                      --resource-group
                      [--command-id]

必要參數

--name -n

受控叢集的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--command-id -i

從 'aks 命令叫用' 傳回的 CommandId。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。