You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/tutorial-kubernetes-deploy-application.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
-
title: Kubernetes on Azure tutorial - Deploy an application
2
+
title: Kubernetes on Azure tutorial - Deploy an application
3
3
description: In this Azure Kubernetes Service (AKS) tutorial, you deploy a multi-container application to your cluster using a custom image stored in Azure Container Registry.
4
4
services: container-service
5
5
ms.topic: tutorial
6
-
ms.date: 05/24/2021
6
+
ms.date: 12/28/2022
7
7
8
8
ms.custom: mvc, devx-track-azurepowershell
9
9
@@ -25,13 +25,13 @@ In later tutorials, you'll scale out and update your application.
25
25
This quickstart assumes you have a basic understanding of Kubernetes concepts. For more information, see [Kubernetes core concepts for Azure Kubernetes Service (AKS)][kubernetes-concepts].
26
26
27
27
> [!TIP]
28
-
> AKS clusters can use GitOps for configuration management. GitOp enables declarations of your cluster's state, which are pushed to source control, to be applied to the cluster automatically. To learn how to use GitOps to deploy an application with an AKS cluster, see the tutorial [Use GitOps with Flux v2][gitops-flux-tutorial] and follow the [prerequisites for Azure Kubernetes Service clusters][gitops-flux-tutorial-aks].
28
+
> AKS clusters can use GitOps for configuration management. GitOp enables declarations of your cluster's state, which are pushed to source control, to be applied to the cluster automatically. To learn how to use GitOps to deploy an application with an AKS cluster, see the [prerequisites for Azure Kubernetes Service clusters][gitops-flux-tutorial-aks] in the [GitOps with Flux v2][gitops-flux-tutorial] tutorial.
29
29
30
30
## Before you begin
31
31
32
32
In previous tutorials, you packaged an application into a container image, uploaded the image to Azure Container Registry, and created a Kubernetes cluster.
33
33
34
-
To complete this tutorial, you need the pre-created `azure-vote-all-in-one-redis.yaml` Kubernetes manifest file. This file download was included with the application source code in a previous tutorial. Verify that you've cloned the repo and changed directories into the cloned repo. If you haven't done these steps and would like to follow along, start with [Tutorial 1: Prepare an application for AKS][aks-tutorial-prepare-app].
34
+
To complete this tutorial, you need the pre-created `azure-vote-all-in-one-redis.yaml` Kubernetes manifest file. This file download was included with the application source code in a previous tutorial. Verify that you've cloned the repo and that you've changed directories into the cloned repo. If you haven't done these steps and would like to follow along, start with [Tutorial 1: Prepare an application for AKS][aks-tutorial-prepare-app].
35
35
36
36
### [Azure CLI](#tab/azure-cli)
37
37
@@ -49,37 +49,37 @@ In these tutorials, an Azure Container Registry (ACR) instance stores the contai
49
49
50
50
### [Azure CLI](#tab/azure-cli)
51
51
52
-
Get the ACR login server name using the [az acr list][az-acr-list] command as follows:
52
+
Get the ACR login server name using the [az acr list][az-acr-list] command.
53
53
54
54
```azurecli
55
55
az acr list --resource-group myResourceGroup --query "[].{acrLoginServer:loginServer}" --output table
56
56
```
57
57
58
58
### [Azure PowerShell](#tab/azure-powershell)
59
59
60
-
Get the ACR login server name using the [Get-AzContainerRegistry][get-azcontainerregistry] cmdlet as follows:
60
+
Get the ACR login server name using the [Get-AzContainerRegistry][get-azcontainerregistry] cmdlet.
The sample manifest file from the git repo cloned in the first tutorial uses the images from Microsoft Container Registry (*mcr.microsoft.com*). Make sure that you're in the cloned *azure-voting-app-redis* directory, then open the manifest file with a text editor, such as `vi`:
68
+
The sample manifest file from the git repo you cloned in the first tutorial uses the images from Microsoft Container Registry (*mcr.microsoft.com*). Make sure you're in the cloned *azure-voting-app-redis* directory, and then open the manifest file with a text editor, such as `vi`:
69
69
70
70
```console
71
71
vi azure-vote-all-in-one-redis.yaml
72
72
```
73
73
74
-
Replace *mcr.microsoft.com* with your ACR login server name. The image name is found on line 60 of the manifest file. The following example shows the default image name:
74
+
Replace *mcr.microsoft.com* with your ACR login server name. You can find the image name on line 60 of the manifest file. The following example shows the default image name:
Provide your own ACR login server name so that your manifest file looks like the following example:
82
+
Provide your own ACR login server name so your manifest file looks similar to the following example:
83
83
84
84
```yaml
85
85
containers:
@@ -91,7 +91,7 @@ Save and close the file. In `vi`, use `:wq`.
91
91
92
92
## Deploy the application
93
93
94
-
To deploy your application, use the [kubectl apply][kubectl-apply] command. This command parses the manifest file and creates the defined Kubernetes objects. Specify the sample manifest file, as shown in the following example:
94
+
To deploy your application, use the [`kubectl apply`][kubectl-apply] command, specifying the sample manifest file. This command parses the manifest file and creates the defined Kubernetes objects.
95
95
96
96
```console
97
97
kubectl apply -f azure-vote-all-in-one-redis.yaml
@@ -112,13 +112,13 @@ service "azure-vote-front" created
112
112
113
113
When the application runs, a Kubernetes service exposes the application front end to the internet. This process can take a few minutes to complete.
114
114
115
-
To monitor progress, use the [kubectl get service][kubectl-get] command with the `--watch` argument.
115
+
To monitor progress, use the [`kubectl get service`][kubectl-get] command with the `--watch` argument.
116
116
117
117
```console
118
118
kubectl get service azure-vote-front --watch
119
119
```
120
120
121
-
Initially the *EXTERNAL-IP* for the *azure-vote-front* service is shown as *pending*:
121
+
Initially the *EXTERNAL-IP* for the *azure-vote-front* service shows as *pending*.
To see the application in action, open a web browser to the external IP address of your service:
133
+
To see the application in action, open a web browser to the external IP address of your service.
134
134
135
135
:::image type="content" source="./media/container-service-kubernetes-tutorials/azure-vote.png" alt-text="Screenshot showing the container image Azure Voting App running in an AKS cluster opened in a local web browser" lightbox="./media/container-service-kubernetes-tutorials/azure-vote.png":::
136
136
137
-
If the application didn't load, it might be due to an authorization problem with your image registry. To view the status of your containers, use the `kubectl get pods` command. If the container images can't be pulled, see [Authenticate with Azure Container Registry from Azure Kubernetes Service](cluster-container-registry-integration.md).
137
+
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](cluster-container-registry-integration.md).
138
138
139
139
## Next steps
140
140
141
-
In this tutorial, a sample Azure vote application was deployed to a Kubernetes cluster in AKS. You learned how to:
141
+
In this tutorial, you deployed a sample Azure vote application to a Kubernetes cluster in AKS. You learned how to:
142
142
143
143
> [!div class="checklist"]
144
-
> * Update a Kubernetes manifest files
145
-
> * Run an application in Kubernetes
146
-
> * Test the application
144
+
>
145
+
> * Update a Kubernetes manifest file.
146
+
> * Run an application in Kubernetes.
147
+
> * Test the application.
147
148
148
-
Advance to the next tutorial to learn how to scale a Kubernetes application and the underlying Kubernetes infrastructure.
149
+
In the next tutorial, you'll learn how to scale a Kubernetes application and the underlying Kubernetes infrastructure.
149
150
150
151
> [!div class="nextstepaction"]
151
152
> [Scale Kubernetes application and infrastructure][aks-tutorial-scale]
0 commit comments