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
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,10 @@ In this tutorial, you adapt the [AKS sample voting application](https://github.c
35
35
36
36
1. Take note of the user name for your Redis user from the portal. You use this user name with the AKS workload.
37
37
38
+
## Run sample locally
39
+
40
+
To run this sample locally, configure your user principal as a Redis User on your Redis instance. The code sample will use your user principal through (DefaultAzureCredential)[https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/?tabs=command-line#use-defaultazurecredential-in-an-application] to connect to Redis instance.
41
+
38
42
## Configure your AKS cluster
39
43
40
44
Follow these [steps](/azure/aks/workload-identity-deploy-cluster) to configure a workload identity for your AKS cluster. Complete the following steps:
@@ -101,7 +105,7 @@ If you use Azure Cloud Shell, _kubectl_ is already installed, and you can skip t
101
105
102
106
## Run your workload
103
107
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.
108
+
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. When using access key authentication, replace the value of AUTHENTICATION_TYPE, REDIS_HOSTNAME and REDIS_ACCESSKEY environment variables.
105
109
106
110
```yml
107
111
apiVersion: v1
@@ -125,12 +129,14 @@ If you use Azure Cloud Shell, _kubectl_ is already installed, and you can skip t
125
129
memory: "128Mi"
126
130
cpu: "250m"
127
131
env:
128
-
- name: CONNECTION_OPTION
129
-
value: "MANAGED_IDENTITY" #ACCESS_KEY
130
-
- name: CONNECTION_STRING # Required when connecting with access key
131
-
value: "your connection string"
132
-
- name: CACHE_NAME
133
-
value: "your cache name"
132
+
- name: AUTHENTICATION_TYPE
133
+
value: "MANAGED_IDENTITY" # change to ACCESS_KEY to authenticate using access key
0 commit comments