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 the development environment and create the Azure resources
If you wish to use GitHub Codespaces, navigate to your codespaces for the MicrosoftDocs/mslearn-aspnet-core repository. Create a new codespace using the
main branch, and then skip to step 3.
From a new Visual Studio Code window, press Ctrl+Shift+P to open the command palette, and then search for and select Remote-Containers: Clone Repository in Container Volume.
Provide the following repository URL:
Visual Studio Code creates your development container.
After the project loads in the container, expand the modules directory, then microservices-aspnet-core, and then finally deploy. Right-click on the k8s directory and select Open in Integrated Terminal. This location contains the scripts you're going to use in this module. (Note: By default, Code will display k8s on the same line as deploy because deploy only contains subdirectories.)
In the new terminal pane, sign in to the Azure CLI. If using GitHub Codespaces, include the
--use-device-codeflag. If you are using Visual Studio Code, you may optionally omit the flag.
az login --use-device-code
View your selected Azure subscription.
az account show -o table
If the wrong subscription is selected, select the correct one using the az account set command.
Run the quickstart script:
The quickstart script creates Azure resources in the
centralusregion. This behavior can be customized by changing the
defaultLocationvariable at the top of quickstart.sh before you run the script.
The preceding command runs a script that completes the following steps:
- Provisions AKS and Azure Container Registry resources.
- Deploys the containers to a fully managed Kubernetes service in Azure, known as AKS.
- Displays connection information upon completion.
This unit uses scripts to keep focus on the learning objectives. The script outputs colored text to indicate the commands being executed. You can inspect the script and the output to better understand the commands used.
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.