Share via


az aksarc logs

Note

This reference is part of the aksarc extension for the Azure CLI (version 2.32.0 or higher). The extension will automatically install the first time you run an az aksarc logs command. Learn more about extensions.

Collect logs from provisioned clusters.

Commands

Name Description Type Status
az aksarc logs hci

Collect logs from provisioned clusters in HCI environment.

Extension GA

az aksarc logs hci

Collect logs from provisioned clusters in HCI environment.

az aksarc logs hci [--credentials-dir]
                   [--ip]
                   [--kubeconfig]
                   [--out-dir]

Examples

Collect logs with IP address and SSH credentials

az aksarc logs hci --ip 192.168.200.31 192.168.200.32 --ssh-key ~/.ssh --out-dir ./logs

Collect logs with kubeconfig and SSH credentials, kubeconfig is only used to collect IP addresses, and ssh-key file path is used instead of directory

az aksarc logs hci --kubeconfig ~/.kube/config --ssh-key ~/.ssh/id_rsa --out-dir ./logs

Optional Parameters

--credentials-dir --ssh-key

Path to SSH credentials to connect to nodes, either id_rsa file or directory is accepted.

--ip --ips

IP(s) of all the nodes (control plane, etc.) need to collect logs.

--kubeconfig

Path to kubeconfig file to connect to the cluster.

--out-dir

Output directory to store collected logs. If not specified, logs will be stored in the current directory.

Global Parameters
--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.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: 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.