Below is the method to create a new azure container registry and i will use Azure cli to do that
Below is the method to create a new Azure container registry and i will do that using Azure Cli So what i will do is
- Login to Azure
- Create a resource group
- Create Azure Container Registry
- Verify from Azure portal
I will start by defining some variables that i will be using with my Powershell
$subscriptionid = 'SUBSCRIPTION_ID'
$aksClusterResourceGroup = 'CLUSTER_RESOURCE_GROUP'
$resourceGroupLocation = 'RESOURCE_GROUP_LOCATION'
$acrName = 'CONTAINER_REGISTRY_NAME'
$Sku = 'basic'
First I will login to azure and switch to the right subscription
az login
az account set --subscription $subscriptionid
az account show --output table
Then I will create the resource group in which my AKS cluster will be deployed.
az group create --location $resourceGroupLocation --name $aksClusterResourceGroup
Now we will create the Azure container registry
az acr create `
--name $acrName `
--resource-group $aksClusterResourceGroup `
--sku $sku `
--location $resourceGroupLocation
Let’s verify the registry using the CLI
az acr list --output table
Finally, we will go to Azure portal and see if the registry is created or not