@@ -31,7 +31,7 @@ possible and will be documented as they are tested.
3131- Two kubernetes clusters that are network connected to each other. For example using
3232 - [ Azure VPN Gatway] ( https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpngateways )
3333 - [ Azure ExpressRoute] ( https://learn.microsoft.com/en-us/azure/expressroute/expressroute-introduction )
34- - ENV variables ` $AZURE_MEMBER ` and ` $ON_PREM_MEMBER ` with the kubectl context names for your clusters
34+ - ENV variables ` $CLOUD_MEMBER ` and ` $ON_PREM_MEMBER ` with the kubectl context names for your clusters
3535 - (e.g. "azure-documentdb-cluster", "k3s-cluster-context")
3636
3737## Architecture Overview
@@ -94,7 +94,7 @@ Run `kubectl get membercluster -A` again and see `True` under `JOINED` to confir
9494
9595``` bash
9696# Install on primary
97- kubectl config use-context $AZURE_MEMBER
97+ kubectl config use-context $CLOUD_MEMBER
9898helm repo add jetstack https://charts.jetstack.io
9999helm repo update
100100helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true
@@ -251,7 +251,7 @@ kubectl apply -f ./documentdb-base.yaml
251251After a few seconds, ensure that the operator is running on both of the clusters
252252
253253``` sh
254- kubectl config use-context $AZURE_MEMBER
254+ kubectl config use-context $CLOUD_MEMBER
255255kubectl get deployment -n documentdb-operator
256256kubectl config use-context $ON_PREM_MEMBER
257257kubectl get deployment -n documentdb-operator
@@ -274,21 +274,21 @@ Physical replication provides high availability and disaster recovery capabiliti
274274``` bash
275275kubectl config use-context $ON_PREM_MEMBER
276276kubectl create configmap cluster-name -n kube-system --from-literal=name=on-prem-cluster-name
277- kubectl config use-context $AZURE_MEMBER
278- kubectl create configmap cluster-name -n kube-system --from-literal=name=azure -cluster-name
277+ kubectl config use-context $CLOUD_MEMBER
278+ kubectl create configmap cluster-name -n kube-system --from-literal=name=cloud -cluster-name
279279```
280280
281281OR
282282
283283``` bash
284- cat << EOF > azure -cluster-name.yaml
284+ cat << EOF > cloud -cluster-name.yaml
285285apiVersion: v1
286286kind: ConfigMap
287287metadata:
288288 name: cluster-name
289289 namespace: kube-system
290290data:
291- name: "azure -cluster-name"
291+ name: "cloud -cluster-name"
292292EOF
293293
294294cat << EOF > on-prem-name.yaml
@@ -301,7 +301,7 @@ data:
301301 name: "on-prem-cluster-name"
302302EOF
303303
304- kubectl config use-context $AZURE_MEMBER
304+ kubectl config use-context $CLOUD_MEMBER
305305kubectl apply -f ./primary-name.yaml
306306kubectl config use-context $ON_PREM_MEMBER
307307kubectl apply -f ./replica-name.yaml
@@ -332,9 +332,9 @@ spec:
332332 storage:
333333 pvcSize: 10Gi
334334 clusterReplication:
335- primary: azure -cluster-name
335+ primary: cloud -cluster-name
336336 clusterList:
337- - name: azure -cluster-name
337+ - name: cloud -cluster-name
338338 - name: on-prem-cluster-name
339339 exposeViaService:
340340 serviceType: ClusterIP
@@ -364,7 +364,7 @@ kubectl apply -f ./documentdb-resource.yaml
364364After a few seconds, ensure that the operator is running on both of the clusters
365365
366366``` sh
367- kubectl config use-context $AZURE_MEMBER
367+ kubectl config use-context $CLOUD_MEMBER
368368kubectl get pods -n documentdb-operator-ns
369369kubectl config use-context $ON_PREM_MEMBER
370370kubectl get pods -n documentdb-operator-ns
@@ -374,16 +374,16 @@ Output:
374374
375375``` text
376376NAME READY STATUS RESTARTS AGE
377- azure -cluster-name-1 2/2 Running 0 3m33s
377+ cloud -cluster-name-1 2/2 Running 0 3m33s
378378```
379379
380380## Testing and Verification
381381
3823821 . Test connection to DocumentDB:
383383
384384``` bash
385- # Get the service IP from primary (azure )
386- kubectl config use-context $AZURE_MEMBER
385+ # Get the service IP from primary (cloud )
386+ kubectl config use-context $CLOUD_MEMBER
387387service_ip=$( kubectl get service documentdb-service-documentdb-preview -n documentdb-preview-ns -o jsonpath=" {.status.loadBalancer.ingress[0].ip}" )
388388
389389# Connect using mongosh
0 commit comments