Skip to content

Instantly share code, notes, and snippets.

@staslebedenko
Last active September 14, 2020 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save staslebedenko/0a0c7ea0cf21d1f29d74ab1db3190cb5 to your computer and use it in GitHub Desktop.
Save staslebedenko/0a0c7ea0cf21d1f29d74ab1db3190cb5 to your computer and use it in GitHub Desktop.
location=northeurope
groupName=k82-cluster
clusterName=k82-cluster
registryName=k82Registry
accountSku=Standard_LRS
accountName=k82storagek
queueName=k8queue
queueResultsName=k8queueresults
az group create --name $groupName --location $location
az storage account create --name $accountName --location $location --kind StorageV2 \
--resource-group $groupName --sku $accountSku --access-tier Hot --https-only true
accountKey=$(az storage account keys list --resource-group $groupName --account-name $accountName --query "[0].value" | tr -d '"')
accountConnString="DefaultEndpointsProtocol=https;AccountName=$accountName;AccountKey=$accountKey;EndpointSuffix=core.windows.net"
az storage queue create --name $queueName --account-key $accountKey \
--account-name $accountName --connection-string $accountConnString
az storage queue create --name $queueResultsName --account-key $accountKey \
--account-name $accountName --connection-string $accountConnString
az acr create --resource-group $groupName --name $registryName --sku Standard
az acr identity assign --identities [system] --name $registryName
az aks create --resource-group $groupName --name $clusterName --node-count 3 --generate-ssh-keys --network-plugin azure
az aks update --resource-group $groupName --name $clusterName --attach-acr $registryName
echo "Update local.settings.json Values=>AzureWebJobsStorage value with: " $accountConnString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment