READ THIS ENTIRE DOCUMENT CAREFULLY BEFORE BEGINNING YOUR PROJECT
Then use it along with the Microservice Tutorial Instructions.
- Navigate to the Microservice Tutorial to complete this project.
- On the “Intro” page of .NET Tutorial – Your First Microservice, select Linux. Complete all steps for the Linux operating system.
- On the Install .NET SDK page, use the following link instead of the one in the tutorial:
Install .NET on Ubuntu - .NET | Microsoft Learn - Select the 20.04 distribution, scroll down to Add the Microsoft Package Repository, and run the
wgetcommand for .NET 8. - Install the SDK.
- Return to the tutorial and verify that everything installed correctly. (You do not need to install the runtime.)
- Follow the directions in the tutorial to Create your service.
- Then Run your service.
- Take a screenshot of your browser results showing the weather forecast data of your application. Be sure to include the URL in your screenshot.
- Label this screenshot: 1-Running the Service
- Underneath the screenshot, answer the following question:
What port was your application listening on?
- Check your Docker version with:
docker --version
- If your version is less than 23.0.0, skip the "Download and install" section in the tutorial and instead run:
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
- After updating Docker, verify the Docker version again (it should now be higher than 23.0.x).
- Return to the tutorial and make sure the Linux tab is selected.
- In the section Add Docker Metadata, follow the instructions.
- You may use
nanoinstead oftouchto create the Dockerfile:
nano Dockerfile- Press
Ctrl + S, thenCtrl + Xto save and exit.
- You may use
- Complete the steps for Optional: Add a .dockerignore file.
- Follow the tutorial instructions to Create Docker image and Run Docker image.
- Take a screenshot of your application running in the container (include the URL).
- Label this screenshot: 2-Running the Docker image
⚠️ You will need a Docker Hub account and an Azure subscription.
Make sure you have set up your Azure for Students free account if you haven't already.
Important: Always ensure the Linux tab is selected when completing steps.
- Follow the instructions to Push to Docker Hub.
- In the section Setup Azure Tools, skip "Create an Azure Account". (You should already have an Azure for Students account.)
- Click Install the Azure CLI.
- In the article "How to install the Azure CLI", select Install on Ubuntu/Debian with apt.
- On the "Install the Azure CLI" page:
- Scroll down and select Option 1 - Install with one command, then upgrade the CLI with:
sudo apt-get update && sudo apt-get upgrade -y - Return to the tutorial and follow the instructions to Sign in to Azure using your personal email (the one linked to Azure).
- Use the
sudocommand to install the AKS CLI.- If you get an error
"MissingSubscriptionRegistration", run:
az provider register --namespace Microsoft.ContainerService
- If you get an error
- Follow the instructions to Create Azure Resources.
- In the Deploy to Azure section, use
nanoto create thedeploy.yamlfile. - Run the deployment and Test your deployment service.
- Take a screenshot of your browser results showing the weather forecast data.
- Label this screenshot: 3 – Deployed Service
- Scale your service.
- Display the pods with:
kubectl get pods -o wide
- Take a screenshot of the results.
Label it: 4 - Scaled Application
- Take a screenshot of the results.
- In a browser window, navigate to Azure Portal.
- In the blue search box, type Kubernetes Service.
- Click on MyMicroServiceCluster.
- On the left menu under Kubernetes Resources, click Workloads and observe the results.
- Take a screenshot of this page.
Label it: 5 – Kubernetes Resources in Azure
- Take a screenshot of this page.
You have created a microservice, containerized it, and deployed it to the cloud!