This article and the accompanying sample files show you how to collect information about your deployed resources in Azure using data from the Azure management APIs, suitable for reporting and automation. We walk through an approach based on retrieving the raw information (in this case, a list of virtual machines).
Modify the definition to include the Microsoft Support actions. Upload the new custom role to Azure. The following PowerShell statement (a) downloads the Reader role definition; (b) converts the object to human-readable JavaScript Object Notation (JSON) format; and (c) saves the file under a new name to our local disk: Get-AzRoleDefinition
First we need to login to the Azure account by configuring Azure subscription and login details. And then we need to connect to Kubernetes Cluster only then we can able to run Kubectl commands. Steps to connect Azure account: Open command prompt, run az cloud set --name AzureCloud. To set Azure Government cloud, run az cloud set --name
Create a user. To assign a role, you need a user, group, or service principal. If you don't already have a user, you can create one. In Azure Cloud Shell, create a password that complies with your password complexity requirements.
Install either the latest Azure CLI or the latest Azure PowerShell module. az login subscriptionId="" az account set --subscription Description. The Get-AzResourceGroup cmdlet gets Azure resource groups in the current subscription. You can get all resource groups, or specify a resource group by name or by other properties. By default, this cmdlet gets all resource groups in the current subscription. For more information about Azure resources and Azure resource groups, see rWZS.