Skip to content

Commit 42066b9

Browse files
committed
Add instructions to connect to two clusters
1 parent dfe6d35 commit 42066b9

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

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

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,19 @@ az aks install-cli
114114
```
115115
If you use Azure Cloud Shell, _kubectl_ is already installed, and you can skip this step.
116116

117-
### Connect to your AKS cluster
117+
### Connect to your AKS clusters in two regions
118118

119-
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:
119+
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:
120120

121121
```bash
122-
az aks get-credentials --resource-group myResourceGroup --name myClusterName
122+
az aks get-credentials --resource-group myResourceGroup --name myClusterName -f AKS_WestUS2
123123
```
124124

125125
Verify that you are able to connect to your cluster by running the following command:
126126

127127
```bash
128+
set kubeconfig=AKS_WestUS2
129+
128130
kubectl get nodes
129131
```
130132

@@ -137,11 +139,27 @@ aks-agentpool-21274953-vmss000003 Ready agent 1d v1.24.15
137139
aks-agentpool-21274953-vmss000006 Ready agent 1d v1.24.15
138140
```
139141

142+
Now, repeat the steps for getting credentials for your AKS cluster in East US region.
143+
144+
```bash
145+
az aks get-credentials --resource-group myResourceGroup --name myClusterName -f AKS_EastUS
146+
147+
set kubeconfig=AKS_EastUS
148+
149+
kubectl get nodes
150+
```
151+
152+
Thus, you now have context on your machine to connect to both the AKS clusters on your machine.
153+
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.
154+
155+
140156
## Deploy and test your application
141157

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

144160
```bash
161+
set kubeconfig=AKS_WestUS2
162+
145163
kubectl apply -f app_west.yaml
146164
```
147165

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

185203
```bash
204+
set kubeconfig=AKS_EastUS
205+
186206
kubectl apply -f app_east
187207

188208
kubectl get pods -n east

0 commit comments

Comments
 (0)