Skip to content

Commit 1028d58

Browse files
committed
Merge branch 'active-repl-demo' of https://github.com/shpathak-msft/azure-docs-pr into active-repl-demo
2 parents 4d814e4 + 2c09d59 commit 1028d58

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

articles/azure-cache-for-redis/cache-tutorial-active-replication.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,19 @@ az aks install-cli
125125

126126
If you use Azure Cloud Shell, _kubectl_ is already installed, and you can skip this step.
127127

128-
### Connect to your AKS cluster
128+
### Connect to your AKS clusters in two regions
129129

130-
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:
130+
Use the portal to copy the resource group and cluster name for your AKS cluster in the West US 2 region. To configure _kubectl_ to connect to your AKS cluster, use the following command with your resource group and cluster name:
131131

132132
```bash
133-
az aks get-credentials --resource-group myResourceGroup --name myClusterName
133+
az aks get-credentials --resource-group myResourceGroup --name myClusterName -f AKS_WestUS2
134134
```
135135

136136
Verify that you are able to connect to your cluster by running the following command:
137137

138138
```bash
139+
set kubeconfig=AKS_WestUS2
140+
139141
kubectl get nodes
140142
```
141143

@@ -148,11 +150,27 @@ aks-agentpool-21274953-vmss000003 Ready agent 1d v1.24.15
148150
aks-agentpool-21274953-vmss000006 Ready agent 1d v1.24.15
149151
```
150152

153+
Now, repeat the steps for getting credentials for your AKS cluster in East US region.
154+
155+
```bash
156+
az aks get-credentials --resource-group myResourceGroup --name myClusterName -f AKS_EastUS
157+
158+
set kubeconfig=AKS_EastUS
159+
160+
kubectl get nodes
161+
```
162+
163+
Thus, you now have context on your machine to connect to both the AKS clusters on your machine.
164+
Alternately, you can apply the YAML files to appropriate AKS clusters through portal directly. To apply YAML through portal, go to the "Services and ingresses" blade for your AKS cluster, and click on the "Create" and choose "Apply a YAML" option. This will open an editor where you can copy paste your YAML file.
165+
166+
151167
## Deploy and test your application
152168

153169
Run the following command to deploy the application instance to your AKS cluster in **West US 2**:
154170

155171
```bash
172+
set kubeconfig=AKS_WestUS2
173+
156174
kubectl apply -f app_west.yaml
157175
```
158176

@@ -196,6 +214,8 @@ Once the External-IP is available, open a web browser to the External-IP address
196214
Run the same deployment steps and deploy an instance of the demo application to run in East US region.
197215

198216
```bash
217+
set kubeconfig=AKS_EastUS
218+
199219
kubectl apply -f app_east
200220
201221
kubectl get pods -n east
@@ -214,8 +234,11 @@ You did it! Click on the buttons and explore the demo. To reset the count, add `
214234
To clean up your cluster, run the following commands:
215235

216236
```bash
237+
set kubeconfig=AKS_WestUS2
217238
kubectl delete deployment shoppingcart-app -n west
218239
kubectl delete service shoppingcart-svc -n west
240+
241+
set kubeconfig=AKS_EastUS
219242
kubectl delete deployment shoppingcart-app -n east
220243
kubectl delete service shoppingcart-svc -n east
221244
```

0 commit comments

Comments
 (0)