Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Kubernetes provides a distributed platform for containerized applications. You build and deploy your own applications and services into a Kubernetes cluster and let the cluster manage the availability and connectivity.
You can deploy the sample application in two ways:
- Deploy directly to the AKS cluster from your workstation.
- Deploy by using automation deployment pipelines. In Azure, you can use:
In this tutorial, you deploy a sample application into a Kubernetes cluster directly from your workstation and manage the application by using AKS desktop. You learn how to:
- Update a Kubernetes manifest file.
- Deploy an application in Kubernetes.
- Test the application.
- View application health, logs, metrics, and composition in AKS desktop.
Before you begin
In previous tutorials, you packaged an application into a container image, uploaded the image to Azure Container Registry, and created a Kubernetes cluster. To complete this tutorial, you need the precreated aks-store-quickstart.yaml Kubernetes manifest file. This file was downloaded in the application source code from Tutorial 1 - Prepare application for AKS.
This tutorial creates and updates billable resources, such as LoadBalancer services. Use an identity with permissions to deploy workloads to AKS and read cluster resources.
This tutorial requires the installation of AKS desktop.
Update the manifest file
In these tutorials, your Azure Container Registry (ACR) instance stores the container images for the sample application. To deploy the application, you must update the image names in the Kubernetes manifest file to include your ACR login server name.
Make sure you're in the cloned aks-store-demo directory, and then open the
aks-store-quickstart.yamlmanifest file with a text editor.Update the
imageproperty for the containers by replacing ghcr.io/azure-samples with your ACR login server name.containers: ... - name: order-service image: <acrName>.azurecr.io/aks-store-demo/order-service:1.0 ... - name: product-service image: <acrName>.azurecr.io/aks-store-demo/product-service:1.0 ... - name: store-front image: <acrName>.azurecr.io/aks-store-demo/store-front:1.0 ...
Run the application
Deploy and manage the application by using AKS desktop
AKS desktop is an application-focused developer portal for Azure Kubernetes Service (AKS) that simplifies application deployment and management without requiring deep Kubernetes expertise.
Register your cluster with AKS desktop
- Make sure you're signed in to AKS desktop with the same account that has access to the AKS cluster. Once signed in, select Add from Azure Subscription.
- Enter the name of your Azure subscription if you have more than one. (Alternatively, select the arrow to open the drop-down list, and then select your Azure subscription.)
- Select your cluster, and then select Register Cluster.
Continue when the cluster status appears as connected in AKS desktop.

Create a managed Project in AKS desktop
In AKS desktop, go to the Projects tab and select Create a New Managed Project.
Configure the following Project settings:
- Basics:
- Project Name: For example,
my-dev-frontend - Subscription:
<your-subscription-name> - Cluster:
<your-cluster-name>
- Project Name: For example,
Note
When you set the Azure subscription and AKS cluster, AKS desktop checks for required cluster and subscription feature support.
Networking Policies: You can leave the default settings for this quickstart or update them as needed.
- To expose the application publicly, change Ingress to
Allow all traffic.
- To expose the application publicly, change Ingress to
Compute Quota: Set the values for the test application.

Access: Add someone or delete the entry by deleting the line item.
- Basics:
Under Review, verify the settings for your Project, and then select Create Project.
Deploy an application
Provide an application name, and then select Create Application.
Select a source for your application. For this example, select Kubernetes YAML > Next.

Open
aks-store-quickstart.yaml, copy and paste its contents into the editor, and then select Next.
Review the resources that are created, and then select Deploy and Close.

The resources can take a few minutes to deploy. During this time, the project status might show
Degradedwhile the cluster scales.Check the status of application resources by selecting Resources and then Workloads.
You can force a screen refresh by selecting the top window menu option Navigate > Reload.Select individual workload resources to view their details and events.
Test the application
When the application runs, a Kubernetes service exposes the application front end to the internet. This process can take a few minutes to complete.
AKS desktop
Get the public IP address from Resource > Network > Service: store-front > External IP.

Explore the application in AKS desktop, such as viewing logs and metrics. For more information, see AKS desktop overview.
Command Line
Monitor progress using the
kubectl get servicecommand with the--watchargument.kubectl get service store-front --watchInitially, the
EXTERNAL-IPfor thestore-frontservice shows as<pending>:store-front LoadBalancer 10.0.34.242 <pending> 80:30676/TCP 5sWhen the
EXTERNAL-IPaddress changes from<pending>to a public IP address, useCTRL-Cto stop thekubectlwatch process.The following example output shows a valid public IP address assigned to the service:
store-front LoadBalancer 10.0.34.242 52.179.23.131 80:30676/TCP 67sView the application in action by opening a web browser and navigating to the external IP address of your service:
http://<external-ip>.
If the application doesn't load, it might be an authorization problem with your image registry. To view the status of your containers, use the kubectl get pods command. If you can't pull the container images, see Authenticate with Azure Container Registry from Azure Kubernetes Service.
Azure portal
Navigate to the Azure portal to find your deployment information.
Navigate to your AKS cluster resource.
From the service menu, under Kubernetes Resources, select Services and ingresses.
Copy the External IP shown in the column for the
store-frontservice.Paste the IP into your browser to visit your store page.
Clean up resources
Since you validated the application's functionality, you can now remove the cluster from the application. We will deploy the application again in the next tutorial.
AKS desktop
Note
If you want to continue to the next tutorial step, don't delete the AKS desktop project.
If you're finished, select the Delete icon. In the confirmation message, select Also delete the namespace.

Command line
Stop and remove the container instances and resources using the
kubectl deletecommand.kubectl delete -f aks-store-quickstart.yamlCheck that all the application pods have been removed using the
kubectl get podscommand.kubectl get pods
Next steps
In this tutorial, you deployed a sample Azure application to a Kubernetes cluster in AKS. You learned how to:
- Update a Kubernetes manifest file.
- Run an application in Kubernetes.
- Test the application.
In the next tutorial, you learn how to use PaaS services for stateful workloads in Kubernetes.