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/azure-cache-for-redis/cache-tutorial-aks-get-started.md
+37-37Lines changed: 37 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ In this tutorial, you adapt the [AKS sample voting application](https://github.c
15
15
16
16
- An Azure subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
17
17
- An Azure Kubernetes Service Cluster - For more information on creating a cluster, see [Quickstart: Deploy an Azure Kubernetes Service (AKS) cluster using the Azure portal](/azure/aks/learn/quick-kubernetes-deploy-portal).
18
-
-An user assigned managed identity that you want to use to connect to your Azure Cache for Redis instance.
18
+
-A user assigned managed identity that you want to use to connect to your Azure Cache for Redis instance.
19
19
20
20
> [!IMPORTANT]
21
21
> This tutorial assumes that you are familiar with basic Kubernetes concepts like containers, pods and service.
@@ -27,7 +27,7 @@ In this tutorial, you adapt the [AKS sample voting application](https://github.c
27
27
For this tutorial, use a Standard C1 cache.
28
28
:::image type="content" source="media/cache-tutorial-aks-get-started/cache-new-instance.png" alt-text="Screenshot of creating a Standard C1 cache in the Azure portal":::
29
29
30
-
1. Follow the steps through to create the cache.
30
+
1. Follow the steps through to create the cache.
31
31
32
32
1. Once your Redis cache instance is created, navigate to the **Authentication** tab. Select the user assigned managed identity you want to use to connect to your Redis cache instance, then select **Save**.
33
33
@@ -40,27 +40,27 @@ In this tutorial, you adapt the [AKS sample voting application](https://github.c
40
40
1. Follow these [steps](/azure/aks/workload-identity-deploy-cluster) to configure a workload identity for your AKS cluster. Complete the following steps:
41
41
42
42
- Enable OIDC issuer and workload identity
43
-
- Skip the step to create user assigned managed identity if you have already created your managed identity. If you create a new managed identity, ensure that you create a new Redis User for your managed identity and assign appropriate data access permissions.
44
-
- Create a Kubernetes Service account annotated with the client id of your user assigned managed identity
43
+
- Skip the step to create user assigned managed identity if you already created your managed identity. If you create a new managed identity, ensure that you create a new Redis User for your managed identity and assign appropriate data access permissions.
44
+
- Create a Kubernetes Service account annotated with the client ID of your user assigned managed identity
45
45
- Create a federated identity credential for your AKS cluster.
46
46
47
47
## Configure your workload that connects to Azure Cache for Redis
48
48
49
-
Next, set up the AKS workload to connect to Azure Cache for Redis after you have configured the AKS cluster.
49
+
Next, set up the AKS workload to connect to Azure Cache for Redis after you configure the AKS cluster.
50
50
51
51
1. Download the code for the [sample app](https://github.com/Azure-Samples/azure-cache-redis-sample/connect-from-aks).
52
52
53
53
1. Build and push docker image to your Azure Container Registry using [az acr build](/azure/acr?view=azure-cli-latest.md#az-acr-build) command
54
54
55
-
```bash
56
-
az acr build --image sample/connect-from-aks-sample:1.0 --registry yourcontainerregistry --file Dockerfile .
57
-
```
55
+
```bash
56
+
az acr build --image sample/connect-from-aks-sample:1.0 --registry yourcontainerregistry --file Dockerfile .
57
+
```
58
58
59
59
1. Attach your container registry to your AKS cluster using following command:
60
60
61
-
```bash
62
-
az aks update --name clustername --resource-group mygroup --attach-acr youracrname
63
-
```
61
+
```bash
62
+
az aks update --name clustername --resource-group mygroup --attach-acr youracrname
63
+
```
64
64
65
65
## Deploy your workload
66
66
@@ -78,30 +78,30 @@ If you use Azure Cloud Shell, _kubectl_ is already installed, and you can skip t
78
78
79
79
### Connect to your AKS cluster
80
80
81
-
Use the portal to copy the resource group and cluster name for your AKS cluster. To configure _kubectl_ to connect to your AKS cluster, use the following command with your resource group and cluster name:
81
+
1. Use the portal to copy the resource group and cluster name for your AKS cluster. To configure _kubectl_ to connect to your AKS cluster, use the following command with your resource group and cluster name:
82
82
83
-
```bash
84
-
az aks get-credentials --resource-group myResourceGroup --name myClusterName
85
-
```
83
+
```bash
84
+
az aks get-credentials --resource-group myResourceGroup --name myClusterName
85
+
```
86
86
87
-
Verify that you're able to connect to your cluster by running the following command:
87
+
1. Verify that you're able to connect to your cluster by running the following command:
88
88
89
-
```bash
90
-
kubectl get nodes
91
-
```
89
+
```bash
90
+
kubectl get nodes
91
+
```
92
92
93
-
You should see similar output showing the list of your cluster nodes.
93
+
You should see similar output showing the list of your cluster nodes.
1.This is the pod specification file that you use to run our workload. Take note that the pod has the label "azure.workloadidentity/use: "true"" and is annotated with _serviceAccountName_ as required by AKS workload identity. Replace the value of CONNECTION_STRING, CACHE_NAME and USER_ASSIGNED_PRINCIPAL_ID environment variables that correspond with your cache and managed identity.
104
+
1. The following code describes the pod specification file that you use to run our workload. Take note that the pod has the label _azure.workloadidentity/use: "true"_ and is annotated with _serviceAccountName_ as required by AKS workload identity. Replace the value of CONNECTION_STRING, CACHE_NAME and USER_ASSIGNED_PRINCIPAL_ID environment variables that correspond with your cache and managed identity.
0 commit comments