Exercise - Set up the environment


In this unit, you'll use a script to deploy the existing eShopOnContainers app to Azure Kubernetes Service (AKS).

Open Azure Cloud Shell

  1. Open Azure Cloud Shell in your browser.
  2. Select a directory with access to the Azure subscription in which you want to create resources.
  3. Select Bash from the environment dropdown list in the upper left.

Run deployment script

Run the following command in the command shell:

. <(wget -q -O - https://aka.ms/microservices-aspnet-core-setup)


You can use the Copy button to copy commands to the clipboard. To paste, right-click on a new line in the Cloud Shell window and select Paste, or use the Shift+Insert keyboard shortcut (⌘+V on macOS).

The preceding command retrieves and runs a setup script from a GitHub repository. The script completes the following steps:

  • Installs the required version of the .NET Core SDK.
  • Clones the eShopOnContainers app from a GitHub repository.
  • Provisions AKS and Azure Container Registry resources.
  • Launches the Cloud Shell editor to view the code.
  • Deploys the containers to a fully managed Kubernetes service in Azure, known as AKS.
  • Displays connection information upon completion.


The script installs the required version of the .NET Core SDK alongside the version preinstalled in Azure Cloud Shell. To revert to the default configuration in Cloud Shell, see the instructions in the "Summary" unit.

The script deploys a modified version of the eShopOnContainers reference app. While the script is running, continue to the next unit to review the eShopOnContainers architecture.


Nonblocking warnings are expected in the deployment process. An unexpected exception might occur, or the script might enter a Retrying in 5s... loop with no sign of exiting. In the event of an exception, or if the loop has been running for about five minutes, reset any changes that the script has made.

Select Ctrl+C (⌘+C on macOS) to stop the script. Then run the following command:

cd ~ && \
  rm -rf ~/clouddrive/aspnet-learn && \
  az group delete --name eshop-learn-rg --yes

You can then re-run the setup script.