Condividi tramite


Get on-demand logs for troubleshooting

> Si applica a: AKS su Azure Locale, AKS abilitato da Azure Arc su VMware (anteprima)

This article describes how to collect full on-demand logs and send them to Microsoft support for troubleshooting issues with AKS enabled by Azure Arc.

Prepare the SSH key

Before log collection, you must have the SSH key you obtained when you created the cluster. It is usually saved under the ~/.ssh path; for example, C:\Users\HciiDeploymentUser.ssh\id_rsa. If the SSH key is lost, the log can't be collected.

Collect logs

You can collect logs using IPs or the kubeconfig parameter. If an IP is used, it collects the log from a particular node. If kubeconfig is used, it collects logs from all cluster nodes. This command generates a .zip file on the local disk. For other parameters, see the Az CLI reference. È anche possibile usare il comando PowerShell Get-AzAksArcLog per raccogliere i log. Per altre informazioni, vedere le informazioni di riferimento su PowerShell.

az aksarc get-logs --ip 192.168.200.25 --credentials-dir ./.ssh --out-dir ./logs

Or

az aksarc get-logs --kubeconfig ./.kube/config --credentials-dir ./.ssh --out-dir ./logs

Invia i log al supporto Microsoft

Contatta il supporto Microsoft per inviare i registri a Microsoft. Se l'ambiente è disconnesso, devi ripristinare prima la rete.

Next steps