Configure Azure CLI¶
This guide will walk you through configuring the Azure CLI (az
) for your
Azure account.
Note
If you have already configured az
for your account, you may proceed to
the Verify section.
See also
Overview
What You'll Need¶
- An Azure account.
Procedure¶
Sign in interactively using the Azure CLI's default authentication method that uses a web browser and access token.
Run the login command:
root@rok-tools:~# az login To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XXXXXXXXX to authenticate.
Open your browser, go to https://microsoft.com/devicelogin and enter the authorization code displayed in your terminal.
Sign in with your account credentials in the browser.
Switch back to your management environment, and add the
aks-preview
extension:root@rok-tools:~# az extension add --name aks-preview
Update the
aks-preview
extension to the latest version available:root@rok-tools:~# az extension update --name aks-preview
Verify¶
Verify you have successfully signed in to your account:
root@rok-tools:~# az account show { "environmentName": "AzureCloud", "homeTenantId": "b478f816-f0bc-49db-aca1-57aae4be5493", "id": "700556b9-3e58-4978-9cd4-6cb3d7310e03", "isDefault": true, "managedByTenants": [], "name": "Azure subscription", "state": "Enabled", "tenantId": "b478f816-f0bc-49db-aca1-57aae4be5493", "user": { "name": "jdoe@example.com", "type": "user" } }
Verify you can access Azure Kubernetes Service:
root@rok-tools:~# az aks list []