{"id":8294,"date":"2020-03-18T09:41:44","date_gmt":"2020-03-18T16:41:44","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=8294"},"modified":"2025-06-13T23:42:47","modified_gmt":"2025-06-14T06:42:47","slug":"kubernetes-vpc-peering","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/","title":{"rendered":"Inter-Kubernetes Networking via VPC Peering"},"content":{"rendered":"\r\n<h2 class=\"wp-block-heading\">1. Introduction<\/h2>\r\n\r\n\r\n\r\n<p>It is often desirable by enterprise customers to have standby database cluster\/s for data locality and high performance, disaster recovery and\/or for mere data backups. Couchbase Cross Data Center Replication (XDCR) requires no introduction as customers have been using this feature for long to achieve these goals in their environment.<\/p>\r\n\r\n\r\n\r\n<p>However, with more and more Couchbase deployments on the Cloud lately using Couchbase Autonomous Operator (CAO) for Kubernetes, customers have requested for some guidance in setting up networking for their cloud platform.<\/p>\r\n\r\n\r\n\r\n<p>This article goes into depth about configuring networks between Couchbase Clusters in two different regions, using a step-by-step approach. We have used the Amazon AWS platform to deploy the Couchbase cluster in the Amazon EKS environment but we believe the high-level approach would more or less be the same irrespective of the platform of your choice.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">2. Prerequisites<\/h2>\r\n\r\n\r\n\r\n<p>It is highly recommended that you read through my previous blog on <a href=\"https:\/\/www.couchbase.com\/blog\/deploy-self-healing-highly-available-couchbase-cluster-on-kubernetes-using-persistent-volumes\/\">how to deploy Couchbase Cluster on EKS<\/a>. Most of the detailed steps on deploying Couchbase Autonomous Operator are just going to be referenced in this article, so we can focus on networking aspects to setup cross-datacenter replication.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">3. Deploy EKS Clusters in Two Regions<\/h2>\r\n\r\n\r\n\r\n<p>Let&#8217;s begin by deploying two Amazon Elastic Container Service for Kubernetes (Amazon EKS) in two separate regions (Virginia and Ohio).<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1428\" height=\"977\" class=\"wp-image-8296\" src=\"https:\/\/i0.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/xdcr-clusters.png?fit=900%2C616&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png 1428w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters-300x205.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters-1024x701.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters-768x525.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters-235x160.png 235w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters-20x14.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters-1320x903.png 1320w\" sizes=\"auto, (max-width: 1428px) 100vw, 1428px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 1<\/strong>: EKS cluster deployed in Ohio and Virginia regions.<\/p>\r\n\r\n\r\n\r\n<p>Each Amazon EKS cluster will have a minimum of three worker nodes, which will be used to host Couchbase pods as described in section 4. Our goal at the end of this article is that you have two Couchbase Clusters deployed on these two Amazon EKS clusters, networking configured and active XDCR established from source to the target cluster.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">3.1. Deploy EKS in Virginia region<\/h3>\r\n\r\n\r\n\r\n<p>We will use <code>eksctl<\/code> command to deploy Amazon EKS, where we will create a new nodegroup called <code>bluegroup<\/code> with minimum of three <code>m5.large<\/code> instances and a maximum of six.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ eksctl create cluster \\\r\n--name blueEKS \\\r\n--version 1.14 \\\r\n--region us-east-1 \\\r\n--zones us-east-1a,us-east-1b,us-east-1c \\\r\n--nodegroup-name bluegroup \\\r\n--node-type m5.large \\\r\n--nodes 3 \\\r\n--nodes-min 3 \\\r\n--nodes-max 6 \\\r\n--node-ami auto \\\r\n--vpc-cidr 172.16.0.0\/24\r\n\r\n[\u2139]  using region us-east-1\r\n...\r\n[\u2714]  EKS cluster \"blueEKS\" in \"us-east-1\" region is ready<\/code><\/pre>\r\n\r\n\r\n\r\n<p>Once <code>eksctl<\/code> finishes deploying the Kubernestes (K8s) cluster, login to AWS console to note down the VPC-ID and CIDR block. Here are the steps to find out these details, which will later use it in setting up VPC peer.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"522\" class=\"wp-image-8297\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/03\/blue-region.png\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-region.png 979w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-region-300x160.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-region-768x409.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-region-20x11.png 20w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 2<\/strong>: EKS console showing resource dashboard by region.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Select <code>Virginia<\/code> region from the dropdown menu.<\/li>\r\n<li>If you see the VPC Dashboard then click <code>Your VPCs<\/code> option from the left pane. If you have a different page open then search for VPC service first and then click <code>Your VPCs<\/code> option.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1122\" height=\"762\" class=\"wp-image-8298\" src=\"https:\/\/i0.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/blue-vpc.png?fit=900%2C611&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-vpc.png 1122w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-vpc-300x204.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-vpc-1024x695.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-vpc-768x522.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-vpc-235x160.png 235w\" sizes=\"auto, (max-width: 1122px) 100vw, 1122px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 3<\/strong>: VPC detail page.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>As can be seen above, you need to select the VPC that just got created and then copy the <code>VPC ID<\/code> into the table below:<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">Table 1. Blue EKS Cluster Attributes<\/h4>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>Attributes<\/th>\r\n<th>Blue Cluster<\/th>\r\n<th>Green Cluster<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>Region<\/td>\r\n<td>Virginia<\/td>\r\n<td>Ohio<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>CIDR block<\/td>\r\n<td>172.16.0.0\/24<\/td>\r\n<td>\u00a0<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>VPC-ID<\/td>\r\n<td>vpc-0c8d3d5919e79659d<\/td>\r\n<td>\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">3.2. Deploy EKS in Ohio region<\/h3>\r\n\r\n\r\n\r\n<p>Next, deploy the Kubernetes cluster in the Ohio region with 3 worker nodes of <code>m5.large<\/code> type. The count and type of these worker nodes can be different depending on the size of the cluster but in this setup, we are going to deploy a 3 node Couchbase cluster on these 3 worker nodes.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ eksctl create cluster \\\r\n--name greenEKS \\\r\n--version 1.14 \\\r\n--region us-east-2 \\\r\n--zones us-east-2a,us-east-2b,us-east-2c \\\r\n--nodegroup-name greengroup \\\r\n--node-type m5.large \\\r\n--nodes 3 \\\r\n--nodes-min 3 \\\r\n--nodes-max 6 \\\r\n--node-ami auto \\\r\n--vpc-cidr 10.0.0.0\/24\r\n\r\n[\u2139]  using region us-east-2\r\n...\r\n[\u2714]  EKS cluster \"greenEKS\" in \"us-east-2\" region is ready<\/code><\/pre>\r\n\r\n\r\n\r\n<p>After the Green cluster is ready, open up a new browser tab and login to AWS console.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1117\" height=\"376\" class=\"wp-image-8299\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/green-region.png?fit=900%2C303&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-region.png 1117w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-region-300x101.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-region-1024x345.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-region-768x259.png 768w\" sizes=\"auto, (max-width: 1117px) 100vw, 1117px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 4<\/strong>: AWS console connected to Ohio region.<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Change the region to Ohio<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1125\" height=\"756\" class=\"wp-image-8300\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/green-vpc.png?fit=900%2C605&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-vpc.png 1125w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-vpc-300x202.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-vpc-1024x688.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-vpc-768x516.png 768w\" sizes=\"auto, (max-width: 1125px) 100vw, 1125px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 5<\/strong>: VPC details page showing Ohio cluster details.<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>From the VPC Dashboard, select <code>Your VPCs<\/code> tab.<\/li>\r\n<li>Copy-paste the VPC ID of the Green Cluster into the below table for the record:<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">Table 2. Green EKS Cluster Attributes<\/h4>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>Attributes<\/th>\r\n<th>Blue Cluster<\/th>\r\n<th>Green Cluster<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>Region<\/td>\r\n<td>Virginia<\/td>\r\n<td>Ohio<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>CIDR block<\/td>\r\n<td>172.16.0.0\/24<\/td>\r\n<td>10.0.0.0\/24<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>VPC-ID<\/td>\r\n<td>vpc-0c8d3d5919e79659d<\/td>\r\n<td>vpc-08d025c8ae697bf34<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>At this point, we have Kubernetes cluster deployed on both Virginia and Ohio regions and we have VPC details that will be used in VPC peering.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">3.3. Switch Cluster Context<\/h3>\r\n\r\n\r\n\r\n<p>Before we move on to deploying Couchbase Clusters on these two regions, one handy command to remember to switch cluster contexts easily:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl config get-contexts\r\n\r\nCURRENT   NAME                                                    CLUSTER                        AUTHINFO                                                NAMESPACE\r\n*         x.y@domain.com@blueEKS.us-east-1.eksctl.io    blueEKS.us-east-1.eksctl.io    x.y@domain.com@blueEKS.us-east-1.eksctl.io\r\n          x.y@domain.com@greenEKS.us-east-2.eksctl.io   greenEKS.us-east-2.eksctl.io   x.y@domain.com@greenEKS.us-east-2.eksctl.io<\/code><\/pre>\r\n\r\n\r\n\r\n<p>As can be seen above there will be two different clusters registered within <code>kubectl config<\/code>. Currently, context is set to <code>blueEKS.us-east-1.eksctl.io<\/code> cluster and if we want to switch to <code>greenEKS.us-east-2.eksctl.io<\/code> cluster we can simply do this:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl config use-context x.y@domain.com@greenEKS.us-east-2.eksctl.io\r\n\r\nSwitched to context \"x.y@domain.com@greenEKS.us-east-2.eksctl.io\".\r\n\r\n$ kubectl get nodes\r\nNAME                                      STATUS    ROLES     AGE       VERSION\r\nip-10-0-0-11.us-east-2.compute.internal   Ready     &lt;none&gt;    20m      v1.14.8-eks-b8860f\r\nip-10-0-0-61.us-east-2.compute.internal   Ready     &lt;none&gt;    20m      v1.14.8-eks-b8860f\r\nip-10-0-0-72.us-east-2.compute.internal   Ready     &lt;none&gt;    20m      v1.14.8-eks-b8860f<\/code><\/pre>\r\n\r\n\r\n\r\n<p>From here onwards any <code>kubectl<\/code> command we run, it will be in context to <code>greenEKS.us-east-2.eksctl.io<\/code> cluster which is in <code>east-2 (Ohio)<\/code> region.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">4. Deploy Couchbase Cluster in Two Regions<\/h2>\r\n\r\n\r\n\r\n<p>In my last blog on <a href=\"https:\/\/www.couchbase.com\/blog\/deploy-self-healing-highly-available-couchbase-cluster-on-kubernetes-using-persistent-volumes\/\">how to deploy Couchbase Cluster on EKS using persistent volumes<\/a>, I covered each step in detail. So instead of repeating the steps, here again, I am just going to follow them to keep things simple.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">4.1 Setup Green Cluster<\/h3>\r\n\r\n\r\n\r\n<p>Let&#8217;s begin deploying our first Couchbase cluster in <code>east-2<\/code> region aka <code>green<\/code> in this case. So following the steps from the last <a href=\"https:\/\/www.couchbase.com\/blog\/deploy-self-healing-highly-available-couchbase-cluster-on-kubernetes-using-persistent-volumes\/\">blog<\/a>, we will:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Deploy Couchbase Autonomous Operator by following 2.1 to 2.8 steps.<\/li>\r\n<li>Create secret and storage-class by performing steps 3.1 to 3.2<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>We are not going to use cluster deployment script as mentioned there, instead, we will use <a href=\"https:\/\/github.com\/couchbaselabs\/cboperator-hol\/blob\/master\/eks\/cb-operator-guide\/files\/xdcr\/couchbase-green-cluster.yaml\">couchbase-green-cluster.yaml<\/a> which will create three-node Couchbase cluster spread across three different availability-zones (east-2a\/2b\/2c).<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl create -f couchbase-green-cluster.yaml -n emart --save-config\r\n\r\ncouchbasecluster.couchbase.com\/green created<\/code><\/pre>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\r\n<p><strong>Note:<\/strong> It is a best practice to enable <code>spec.antiAffinity<\/code> in <a href=\"https:\/\/github.com\/couchbaselabs\/cboperator-hol\/blob\/master\/eks\/cb-operator-guide\/files\/xdcr\/couchbase-green-cluster.yaml\">couchbase-green-cluster.yaml<\/a> to make sure each Kubernetes node get one and only one pod. This assures that if a node fails, only one Couchbase pod goes down.<\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl logs couchbase-operator-7654d844cb-tz7k5 -n emart -f\r\n\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"Node status:\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u2502 Server     \u2502 Version          \u2502 Class        \u2502 Status         \u2502\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u2502 green-0000 \u2502 enterprise-6.0.3 \u2502 data-east-2a \u2502 managed+active \u2502\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"Scheduler status:\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u2502 Class        \u2502 Zone       \u2502 Server     \u2502\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u2502 data-east-2a \u2502 us-east-2a \u2502 green-0000 \u2502\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info msg=\"\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:02Z\" level=info cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:22:08Z\" level=info msg=\"Creating a pod (green-0001) running Couchbase enterprise-6.0.3\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:23:21Z\" level=info msg=\"added member (green-0001)\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:23:21Z\" level=info msg=\"Creating a pod (green-0002) running Couchbase enterprise-6.0.3\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:24:31Z\" level=info msg=\"added member (green-0002)\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:24:39Z\" level=info msg=\"Rebalance progress: 0.000000\" cluster-name=green module=cluster\r\ntime=\"2020-02-22T08:24:43Z\" level=info msg=\"reconcile finished\" cluster-name=green module=cluster<\/code><\/pre>\r\n\r\n\r\n\r\n<p>Now we can port forward to view the Couchbase Admin Console:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl port-forward green-0000 8092:8091 -n emart\r\n\r\nForwarding from 127.0.0.1:8092 -&gt; 8091\r\nForwarding from [::1]:8092 -&gt; 8091<\/code><\/pre>\r\n\r\n\r\n\r\n<p>Next open up a browser and type: https:\/\/localhost:8092\/ to connect to the Couchbase Web Console of <code>Green<\/code> cluster:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1311\" height=\"508\" class=\"wp-image-8301\" src=\"https:\/\/i2.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/green-cluster.png?fit=900%2C349&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-cluster.png 1311w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-cluster-300x116.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-cluster-1024x397.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-cluster-768x298.png 768w\" sizes=\"auto, (max-width: 1311px) 100vw, 1311px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 6<\/strong>: Three nodes Green cluster distributed across three availability zones (AZs)<\/p>\r\n\r\n\r\n\r\n<p>Create an empty bucket <code>default<\/code>, which will be used later on as the target bucket while setting up XDCR.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1123\" height=\"472\" class=\"wp-image-8302\" src=\"https:\/\/i2.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/empty-bucket.png?fit=900%2C378&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/empty-bucket.png 1123w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/empty-bucket-300x126.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/empty-bucket-1024x430.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/empty-bucket-768x323.png 768w\" sizes=\"auto, (max-width: 1123px) 100vw, 1123px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 7<\/strong>: Target bucket with no documents in it<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">4.2 Setup Blue Cluster<\/h3>\r\n\r\n\r\n\r\n<p>We need to change the context of <code>kubectl config<\/code> in order to work with blueEKS cluster.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl config use-context x.y@domain.com@blueEKS.us-east-1.eksctl.io\r\n\r\nSwitched to context \"x.y@domain.com@blueEKS.us-east-1.eksctl.io\".\r\n\r\n$ kubectl get nodes\r\nNAME                          STATUS    ROLES     AGE       VERSION\r\nip-172-16-0-25.ec2.internal   Ready     &lt;none&gt;    2h       v1.14.8-eks-b8860f\r\nip-172-16-0-42.ec2.internal   Ready     &lt;none&gt;    2h       v1.14.8-eks-b8860f\r\nip-172-16-0-76.ec2.internal   Ready     &lt;none&gt;    2h       v1.14.8-eks-b8860f<\/code><\/pre>\r\n\r\n\r\n\r\n<p>After switching the context, we are going to follow the same steps as described above. We will use <a href=\"https:\/\/github.com\/couchbaselabs\/cboperator-hol\/blob\/master\/eks\/cb-operator-guide\/files\/xdcr\/couchbase-blue-cluster.yaml\">couchbase-blue-cluster.yaml<\/a> to finally deploy three-node cluster.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl create -f couchbase-blue-cluster.yaml -n emart --save-config\r\n\r\ncouchbasecluster.couchbase.com\/green created<\/code><\/pre>\r\n\r\n\r\n\r\n<p>Now let&#8217;s take a look at the operator logs to check the progress:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl get pods -n emart\r\nNAME                                            READY     STATUS    RESTARTS   AGE\r\ncouchbase-operator-7654d844cb-58gch             1\/1       Running   0          4m22s\r\ncouchbase-operator-admission-7ff868f54c-57rhc   1\/1       Running   0          5m21s\r\n\r\n$ kubectl logs couchbase-operator-7654d844cb-58gch -n emart -f\r\n\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u2502 Server    \u2502 Version          \u2502 Class        \u2502 Status         \u2502\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u2502 blue-0000 \u2502 enterprise-6.0.3 \u2502 data-east-1a \u2502 managed+active \u2502\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"Scheduler status:\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u2502 Class        \u2502 Zone       \u2502 Server    \u2502\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u2502 data-east-1a \u2502 us-east-1a \u2502 blue-0000 \u2502\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info msg=\"\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:07Z\" level=info cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:52:13Z\" level=info msg=\"Creating a pod (blue-0001) running Couchbase enterprise-6.0.3\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:53:27Z\" level=info msg=\"added member (blue-0001)\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T08:53:27Z\" level=info msg=\"Creating a pod (blue-0002) running Couchbase enterprise-6.0.3\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T09:00:45Z\" level=info msg=\"added member (blue-0002)\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T09:00:54Z\" level=info msg=\"Rebalance progress: 0.000000\" cluster-name=blue module=cluster\r\ntime=\"2020-02-22T09:00:58Z\" level=info msg=\"reconcile finished\" cluster-name=blue module=cluster<\/code><\/pre>\r\n\r\n\r\n\r\n<p>Port forward Couchbase Admin Console to port 8091:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl port-forward green-0000 8091:8091 -n emart\r\n\r\nForwarding from 127.0.0.1:8091 -&gt; 8091\r\nForwarding from [::1]:8091 -&gt; 8091<\/code><\/pre>\r\n\r\n\r\n\r\n<p>Open up another tab in your browser and type: https:\/\/localhost:8091\/ to connect to the Couchbase Web Console of <code>Blue<\/code> cluster:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1121\" height=\"517\" class=\"wp-image-8303\" src=\"https:\/\/i2.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/blue-cluster.png?fit=900%2C415&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-cluster.png 1121w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-cluster-300x138.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-cluster-1024x472.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-cluster-768x354.png 768w\" sizes=\"auto, (max-width: 1121px) 100vw, 1121px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 8<\/strong>: Three nodes blue cluster distributed across three availability zones (AZs)<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">4.2.1 Create travel-sample bucket<\/h4>\r\n\r\n\r\n\r\n<p>We are going to use <code>travel-sample<\/code> bucket as the source data, which we will replicate it to the target <code>green<\/code> cluster. To create a sample bucket, goto Settings&gt;Sample Buckets and then click the checkbox next to <code>travel-sample<\/code>. That will create the required bucket and populate a bunch of documents in the bucket.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1098\" height=\"509\" class=\"wp-image-8304\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/bucket.png?fit=900%2C417&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket.png 1098w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-300x139.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-1024x475.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-768x356.png 768w\" sizes=\"auto, (max-width: 1098px) 100vw, 1098px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 9<\/strong>: Source bucket with some sample data<\/p>\r\n\r\n\r\n\r\n<p>We are going to replicate this travel-sample bucket to the target cluster in the Green (aka Ohio) region.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">5. Network Configuration<\/h2>\r\n\r\n\r\n\r\n<p>The fun begins with the network configuration section. If you have already used AWS Console to set up VPC peering between two regions or two separate VPCs then this section is going to breeze. And if you want to learn how to configure VPC peering this is the going to be a great learning experience.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">5.1 Setup VPC Peering<\/h3>\r\n\r\n\r\n\r\n<p>The first step in the three steps process is to establish VPC peering from the requester VPC to the accepter VPC. In this step, we are going to login to the Virginia region using the AWS console and initiate the peering request. We will then login to the Ohio region to accept this request.<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">5.1.1 Initiate VPC request from Blue region<\/h4>\r\n\r\n\r\n\r\n<p>Let&#8217;s begin the VPC peering initiation process by connecting to the Virginia region.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"522\" class=\"wp-image-8305\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/03\/blue-region-1.png\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-region-1.png 979w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-region-1-300x160.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-region-1-768x409.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-region-1-20x11.png 20w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 10<\/strong>: AWS console displaying resource summary in the Virginia region<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Make sure you have selected the requester region from the AWS console, which in our case in Virginia.<\/li>\r\n<li>Bring up the VPC dashboard page.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"509\" class=\"wp-image-8306\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/03\/select-peering.png\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/select-peering.png 977w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/select-peering-300x156.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/select-peering-768x400.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/select-peering-20x10.png 20w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 11<\/strong>: VPC peering option under the VPC Dashboard<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Select the <code>Peering Connections<\/code> option from the left pane.<\/li>\r\n<li>Click <code>Create Peering Connection<\/code> button from the page.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p>Once you click the button you are going to be presented with a dialog page where we have to:<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Provide a unique name to this peering connection. We are going to use <code>blue-to-green-peering<\/code> because the Virginia region is hosting our Blue cluster and Ohio is hosting our Green cluster.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1125\" height=\"776\" class=\"wp-image-8307\" src=\"https:\/\/i0.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/vpc-request.png?fit=900%2C621&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/vpc-request.png 1125w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/vpc-request-300x207.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/vpc-request-1024x706.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/vpc-request-768x530.png 768w\" sizes=\"auto, (max-width: 1125px) 100vw, 1125px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 12<\/strong>: VPC peering requester and acceptor configuration.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Select the VPC ID of the Blue cluster as that is the requester.<\/li>\r\n<li>Our target cluster is in a different region so we are going to select <code>Another Region<\/code> as the option for <code>Region<\/code>.<\/li>\r\n<li>Select the target region next, which is Ohio.<\/li>\r\n<li>We have noted down the VPC IDs of both the VPCs in table 2. So we will use VPC ID of the Green cluster.<\/li>\r\n<li>Hit <code>Create Peering Connection<\/code> button.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1120\" height=\"412\" class=\"wp-image-8308\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/vpc-established.png?fit=900%2C331&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/vpc-established.png 1120w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/vpc-established-300x110.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/vpc-established-1024x377.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/vpc-established-768x283.png 768w\" sizes=\"auto, (max-width: 1120px) 100vw, 1120px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 13<\/strong>: Peering request established.<\/p>\r\n\r\n\r\n\r\n<p>This will display the confirmation page. Just click <code>OK<\/code> button and that will display you that request has been initiated.<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">5.1.2 Accept VPC request from Green region<\/h4>\r\n\r\n\r\n\r\n<p>Now from AWS console change the region to Ohio (aka Green region) and then select VPC Dashboard.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1117\" height=\"376\" class=\"wp-image-8309\" src=\"https:\/\/i2.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/green-region-1.png?fit=900%2C303&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-region-1.png 1117w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-region-1-300x101.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-region-1-1024x345.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-region-1-768x259.png 768w\" sizes=\"auto, (max-width: 1117px) 100vw, 1117px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Figure 14<\/strong>: Select us-east-2 (Ohio) region<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Same as before selecting the <code>Peering Connections<\/code> option from the left pane so we can complete the peering request by accepting it.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1122\" height=\"669\" class=\"wp-image-8310\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/accept-peering.png?fit=900%2C537&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/accept-peering.png 1122w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/accept-peering-300x179.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/accept-peering-1024x611.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/accept-peering-768x458.png 768w\" sizes=\"auto, (max-width: 1122px) 100vw, 1122px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Figure 15<\/strong>: Select <code>Peering Connections<\/code> options from VPC Dashboard<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>As can be seen above, there is one pending request in the list. We will select the request first.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1123\" height=\"564\" class=\"wp-image-8311\" src=\"https:\/\/i0.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/accept-action.png?fit=900%2C452&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/accept-action.png 1123w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/accept-action-300x151.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/accept-action-1024x514.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/accept-action-768x386.png 768w\" sizes=\"auto, (max-width: 1123px) 100vw, 1123px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Figure 16<\/strong>: Accept VPC peering request<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Then from the <code>Actions<\/code> drop-down button, we will select <code>Accept Request<\/code>.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1088\" height=\"407\" class=\"wp-image-8312\" src=\"https:\/\/i2.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/confirm-peering.png?fit=900%2C337&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/confirm-peering.png 1088w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/confirm-peering-300x112.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/confirm-peering-1024x383.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/confirm-peering-768x287.png 768w\" sizes=\"auto, (max-width: 1088px) 100vw, 1088px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Figure 17<\/strong>: Confirm VPC peering request from the popup<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>A confirmation page will popup. Select <code>Yes, Accept<\/code> button.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1124\" height=\"559\" class=\"wp-image-8313\" src=\"https:\/\/i2.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/peering-active.png?fit=900%2C447&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/peering-active.png 1124w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/peering-active-300x149.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/peering-active-1024x509.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/peering-active-768x382.png 768w\" sizes=\"auto, (max-width: 1124px) 100vw, 1124px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Figure 18<\/strong>: VPC peering connection from source-target is established<\/p>\r\n\r\n\r\n\r\n<p>This completes the VPC peering step one as the status of peering is <code>Active<\/code>.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">5.2 Update Routing-Tables<\/h3>\r\n\r\n\r\n\r\n<p>Step two is to establish the communication channel by adding the CIDR block of the target cluster into the Route Tables. To do that we need to find out which subnets each of three EC2 instances reside.<\/p>\r\n\r\n\r\n\r\n<p>Once we have the list of subnets in each of three AZs (1a, 1b, 1c) where we have Kubernetes worker nodes running, we need to find out the Routing Table associated with each of the three subnets. For these Routing Tables, we would like to add a routing table entry so it allows traffic coming from other VPC via VPC peering. Let&#8217;s take a look at it to step by step.<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">5.2.1 Subnets used in Blue Cluster<\/h4>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Login to AWS console and select the Virginia region (aka Blue region). After that select EC2 service to display all the EC2 instances used as the Kubernetes nodes.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1711\" height=\"821\" class=\"wp-image-8314\" src=\"https:\/\/i0.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/blue-subnet.png?fit=900%2C432&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-subnet.png 1711w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-subnet-300x144.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-subnet-1024x491.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-subnet-768x369.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-subnet-1536x737.png 1536w\" sizes=\"auto, (max-width: 1711px) 100vw, 1711px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Figure 19<\/strong>: Subnet associated to each of the EC2 instances.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Next select one of the EC2 instances. In the picture above I have selected instances in the us-east-1a region and the description tab would display all the details about this instance.<\/li>\r\n<li>Note down the subnet Name (mentioned within the parenthesis) this instance is residing into. Like the above instance is deployed within <code>eksctl-blueEKS-cluster\/SubnetPublicUSEAST1A<\/code> subnet.<\/li>\r\n<li>Repeat the same process till you have the list of all the subnets used in your cluster. In our case we have these three subnets used within our cluster:<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>Attributes<\/th>\r\n<th>us-east-1a<\/th>\r\n<th>us-east-1b<\/th>\r\n<th>us-east-1c<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>Subnet Name<\/td>\r\n<td>eksctl-blueEKS-cluster\/SubnetPublicUSEAST1A<\/td>\r\n<td>eksctl-blueEKS-cluster\/SubnetPublicUSEAST1B<\/td>\r\n<td>eksctl-blueEKS-cluster\/SubnetPublicUSEAST1C<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">5.2.2 Routing Table Associated to Subnets<\/h4>\r\n\r\n\r\n\r\n<p>The next step would be to find out the routing table associated with each of the subnets, so we can add the routing rule to it to allow traffic from Green cluster.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1655\" height=\"616\" class=\"wp-image-8315\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/blue-rt.png?fit=900%2C335&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-rt.png 1655w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-rt-300x112.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-rt-1024x381.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-rt-768x286.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-rt-1536x572.png 1536w\" sizes=\"auto, (max-width: 1655px) 100vw, 1655px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 20<\/strong>: Routing Tables associated with each subnet in the cluster<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>In order to find that Routing Table used, click <code>Subnets<\/code> tab on the left.<\/li>\r\n<li>Next select one of the subnet from the list <code>eksctl-blueEKS-cluster\/SubnetPublicUSEAST1A<\/code><\/li>\r\n<li>Make a note of the Routing Table used by looking under the <code>Description<\/code> tab.<\/li>\r\n<li>Repeat above three steps for each of the subnet and note down the routing table used:<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>Attributes<\/th>\r\n<th>us-east-1a<\/th>\r\n<th>us-east-1b<\/th>\r\n<th>us-east-1c<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>Subnet Name<\/td>\r\n<td>eksctl-blueEKS-cluster\/SubnetPublicUSEAST1A<\/td>\r\n<td>eksctl-blueEKS-cluster\/SubnetPublicUSEAST1B<\/td>\r\n<td>eksctl-blueEKS-cluster\/SubnetPublicUSEAST1C<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Route Table Name<\/td>\r\n<td>eksctl-blueEKS-cluster\/PublicRouteTable<\/td>\r\n<td>eksctl-blueEKS-cluster\/PublicRouteTable<\/td>\r\n<td>eksctl-blueEKS-cluster\/PublicRouteTable<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>As can be noticed that in our case we have one Route Table <code>eksctl-blueEKS-cluster\/PublicRouteTable<\/code> associated with all three subnets, so we are going to update one Route Table only.<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">5.2.3 Add Routing Rule<\/h4>\r\n\r\n\r\n\r\n<p>Now we are going to add <code>10.0.0.0\/24<\/code> CIDR block of the target region into the allowed routing <code>Routes<\/code> of the source routing table.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1675\" height=\"714\" class=\"wp-image-8316\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/add-route.png?fit=900%2C383&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/add-route.png 1675w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/add-route-300x128.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/add-route-1024x436.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/add-route-768x327.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/add-route-1536x655.png 1536w\" sizes=\"auto, (max-width: 1675px) 100vw, 1675px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 21<\/strong>: Route Tables tab showing list of Routing Tables exist in Blue region<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Click the <code>Routing Tables<\/code> tab from the left menu of the AWS console.<\/li>\r\n<li>Select the route table we would like to add the route entry to i.e. <code>eksctl-blueEKS-cluster\/PublicRouteTable<\/code>.<\/li>\r\n<li>Then click the <code>Routes<\/code> button next to the summary tab, where you would see only two route entries.<\/li>\r\n<li>To allow <code>10.0.0.0\/24<\/code> CIDR block click the <code>Edit routes<\/code> button.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1250\" height=\"455\" class=\"wp-image-8317\" src=\"https:\/\/i0.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/add-green-route.png?fit=900%2C328&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/add-green-route.png 1250w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/add-green-route-300x109.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/add-green-route-1024x373.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/add-green-route-768x280.png 768w\" sizes=\"auto, (max-width: 1250px) 100vw, 1250px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 22<\/strong>: Edit Routes dialog page.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>In the above dialog, page add the CIDR block of the GREEN cluster and select VPC-Peering as the target. Next hit <code>save routes<\/code> button.<\/li>\r\n<li>You would see target CIDR block <code>10.0.0.0\/24<\/code> is now part of the <code>Routes<\/code> available for the selected Route Table: <code>eksctl-blueEKS-cluster\/PublicRouteTable<\/code><\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1537\" height=\"700\" class=\"wp-image-8318\" src=\"https:\/\/i2.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/route-added.png?fit=900%2C410&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/route-added.png 1537w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/route-added-300x137.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/route-added-1024x466.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/route-added-768x350.png 768w\" sizes=\"auto, (max-width: 1537px) 100vw, 1537px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 23<\/strong>: Route table showing target CIDR block as the allowed route.<\/p>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\r\n<p><strong>Note:<\/strong> Repeat the same process for Ohio (aka Green) cluster and add CIDR block of Virginia (aka Blue) into the Route Table.<\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1603\" height=\"777\" class=\"wp-image-8319\" src=\"https:\/\/i0.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/blue-route-added.png?fit=900%2C436&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-route-added.png 1603w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-route-added-300x145.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-route-added-1024x496.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-route-added-768x372.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/blue-route-added-1536x745.png 1536w\" sizes=\"auto, (max-width: 1603px) 100vw, 1603px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 24<\/strong>: Route table showing Blue Cluster CIDR block in the Green Cluster Route Table.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">5.3 Update Security Group<\/h3>\r\n\r\n\r\n\r\n<p>The last step of setting up networking on both source and target cluster is to open up a range of ports on which K8s worker nodes are going to communicate with each other. These ports are going to be used for <a href=\"https:\/\/docs.couchbase.com\/operator\/1.2\/xdcr.html#establishing-xdcr-connections\">XDCR communication<\/a> so either we open up port ranging from 30000-32767 or further restrict to a single port which will be used for Overlay Networking as described in 6.0 section.<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">5.3.1 Inbound Rules settings<\/h4>\r\n\r\n\r\n\r\n<p>To keep things simple we are going to allow the range of ports to be open on the NodeGroup used as K8s worker nodes. To change the firewall settings follow these steps:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1313\" height=\"611\" class=\"wp-image-8320\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/sg-ib1.png?fit=900%2C419&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ib1.png 1313w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ib1-300x140.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ib1-1024x477.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ib1-768x357.png 768w\" sizes=\"auto, (max-width: 1313px) 100vw, 1313px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Figure 25<\/strong>: Setup a Security group on Virginia (aka Blue) cluster.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Click the <code>Security Groups<\/code> tab from the left pane of your AWS Console for the Virginia region.<\/li>\r\n<li>Next, locate the security group (SG) with <code>-nodegroup-bluegroup<\/code> as the string in it. This SG is used as the firewall setting for all the worker nodes in your Kubernetes nodegroup.<\/li>\r\n<li>Click <code>Inbound Rules<\/code> tab, which displays a range of ports open for the respective resource.<\/li>\r\n<li>Next click <code>Edit rules<\/code> button to add the new rule to the list.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1313\" height=\"524\" class=\"wp-image-8321\" src=\"https:\/\/i0.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/sg-ib2.png?fit=900%2C359&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ib2.png 1313w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ib2-300x120.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ib2-1024x409.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ib2-768x306.png 768w\" sizes=\"auto, (max-width: 1313px) 100vw, 1313px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 26<\/strong>: Add firewall rule so source and target cluster can communicate with each other.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>As described in the image above, add a new TCP rule for port range 30000-32767 and use CIDR block <code>10.0.0.0\/24<\/code> of target cluster i.e. Ohio (aka Green) cluster. This completes the setting for Inbound traffic.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">5.3.2 Outbound rules settings<\/h4>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Now let&#8217;s create a similar rule for Outbound communication as well. To do that click the <code>Outbound Rules<\/code> button as described below.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1316\" height=\"611\" class=\"wp-image-8324\" src=\"https:\/\/i2.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/sg-ob1-1.png?fit=900%2C417&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ob1-1.png 1316w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ob1-1-300x139.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ob1-1-1024x475.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ob1-1-768x357.png 768w\" sizes=\"auto, (max-width: 1316px) 100vw, 1316px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 27<\/strong>: Outbound Rules settings for selected security group.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Click the <code>Edit rules<\/code> button to add a new rule.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1314\" height=\"460\" class=\"wp-image-8325\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/sg-ob2.png?fit=900%2C315&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ob2.png 1314w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ob2-300x105.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ob2-1024x358.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ob2-768x269.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/sg-ob2-800x280.png 800w\" sizes=\"auto, (max-width: 1314px) 100vw, 1314px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 28<\/strong>: Outbound route updated with additional rule.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Just as before we will add a new <code>Custom TCP Rule<\/code> and allow port ranging from <code>30000-32767<\/code> to be able to communicate with the target CIDR block <code>10.0.0.0\/24<\/code>.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\r\n<p><strong>Note:<\/strong> Just like we added firewall rule on the Nodegroup of Blue cluster, we have to do the same on the Nodegroup of the Green Cluster.<\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<p>After finishing network setting both source and target, clusters should be able to communicate on the port ranges we used and we are good to go to the next step of actually setting up the XDCR so data can be replicated from source to target bucket across the region.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">6.0 XDCR Replication with Overlay Networking<\/h2>\r\n\r\n\r\n\r\n<p>Take a look at the diagram below, which assumes two nodes in separate Kubernetes clusters can communicate with each other. The router depicted could be a switch, router, VPN connection or any other infrastructure which allows layer 3 communication.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"651\" height=\"433\" class=\"wp-image-8326\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/03\/xdcr-overlay.png\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-overlay.png 651w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-overlay-300x200.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-overlay-400x267.png 400w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-overlay-450x300.png 450w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-overlay-20x13.png 20w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 29<\/strong>: XDCR to a Different Kubernetes Cluster via Overlay Networking<\/p>\r\n\r\n\r\n\r\n<p>In the diagram, the pod in Cluster 1 is only able to connect to the node port (31202) exposed in Cluster 2. Furthermore, that port is only exposed to the node on which the pod is running. To determine the correct connection string on the XDCR target cluster follow the procedure:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>List the Couchbase pods deployed in the target cluster. If we want to setup XDCR replication on the Blue cluster then run this command from the <code>Green<\/code> cluster:<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl get pods -n emart\r\n\r\nNAME                                            READY     STATUS    RESTARTS   AGE\r\ngreen-0000                                      1\/1       Running   0          7m39s\r\ngreen-0001                                      1\/1       Running   0          6m19s\r\ngreen-0002                                      1\/1       Running   0          5m8s<\/code><\/pre>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Choose one of the Couchbase pods and get its underlying GKE node\u2019s IP address:<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl get pod green-0000 -o yaml -n emart | grep hostIP\r\n\r\nhostIP: 10.0.0.5<\/code><\/pre>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Get the port number that maps to the admin port (8091).<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>$ kubectl get service green-0000-exposed-ports -n emart\r\n\r\nNAME                       TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)                                                                                                                        AGE\r\ngreen-0000-exposed-ports   NodePort   172.20.55.204   &lt;none&gt;        11210:32262\/TCP,11207:31500\/TCP,8093:32209\/TCP,18093:31965\/TCP,8091:30964\/TCP,18091:30093\/TCP,8092:31555\/TCP,18092:30041\/TCP   7m3s<\/code><\/pre>\r\n\r\n\r\n\r\n<p>If you were logged into the Couchbase Server Web Console on the Blue cluster, and establishing the XDCR connection to the Green cluster, you\u2019d use the connection string <strong>10.0.0.5:30964<\/strong> based on the example above.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">6.1. XDCR from Blue to Green cluster<\/h3>\r\n\r\n\r\n\r\n<p>We are going to configure a uni-directional replication from the <code>Blue<\/code> to the <code>Green<\/code> cluster. You can find more details on the <a href=\"https:\/\/docs.couchbase.com\/server\/6.0\/manage\/manage-xdcr\/xdcr-management-overview.html\">XDCR documentation<\/a>.<\/p>\r\n\r\n\r\n\r\n<p>Let&#8217;s first connect to Couchbase Web Console of the <code>Blue<\/code> cluster using the port forward method.<\/p>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\r\n<p><strong>Note:<\/strong> We already have port forwarding running for both Green cluster using port <code>8092<\/code> and Blue cluster using a port <code>8091<\/code>.<\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<p>In the Blue cluster <a href=\"https:\/\/localhost:8091\">https:\/\/localhost:8091<\/a>:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Add cluster reference of the <strong>green<\/strong> cluster.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1721\" height=\"523\" class=\"wp-image-8327\" src=\"https:\/\/i2.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/green-xdcr.png?fit=900%2C273&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-xdcr.png 1721w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-xdcr-300x91.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-xdcr-1024x311.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-xdcr-768x233.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/green-xdcr-1536x467.png 1536w\" sizes=\"auto, (max-width: 1721px) 100vw, 1721px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 30<\/strong>: XDCR connection from Blue to Green cluster.<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Remote cluster reference added.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1719\" height=\"500\" class=\"wp-image-8328\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/xdcr-setup.png?fit=900%2C262&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-setup.png 1719w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-setup-300x87.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-setup-1024x298.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-setup-768x223.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-setup-1536x447.png 1536w\" sizes=\"auto, (max-width: 1719px) 100vw, 1719px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 31<\/strong>: Replication established.<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Add bucket replication from <strong>travel-sample<\/strong> bucket to <strong>default<\/strong> bucket on the Green cluster.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1720\" height=\"578\" class=\"wp-image-8329\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/bucket-xdcr.png?fit=900%2C302&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-xdcr.png 1720w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-xdcr-300x101.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-xdcr-1024x344.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-xdcr-768x258.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-xdcr-1536x516.png 1536w\" sizes=\"auto, (max-width: 1720px) 100vw, 1720px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 32<\/strong>: Setting up source to target bucket replication.<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Your bucket is now replicating from <code>Blue<\/code> to <code>Green<\/code> cluster.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1722\" height=\"559\" class=\"wp-image-8330\" src=\"https:\/\/i1.wp.com\/blog.couchbase.com\/wp-content\/uploads\/2020\/03\/bucket-replicating.png?fit=900%2C292&amp;ssl=1\" alt=\"\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-replicating.png 1722w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-replicating-300x97.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-replicating-1024x332.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-replicating-768x249.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/bucket-replicating-1536x499.png 1536w\" sizes=\"auto, (max-width: 1722px) 100vw, 1722px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><br \/><strong>Figure 33<\/strong>: Active replication of buckets from Virginia to Ohio cluster.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">7. Conclusion<\/h2>\r\n\r\n\r\n\r\n<p>In this article, we have unraveled the networking details to show you how easy it is to set up <a href=\"https:\/\/www.couchbase.com\/blog\/vpc-peering-capella-aws\/\">VPC peering<\/a> across regions in the context of Couchbase Autonomous Operator. We have used one of the cloud platforms to drive the deployment of the geo-distributed Couchbase clusters but what we want to highlight is that once you understand the concepts then applying those in any other cloud platform would be a simple progression.<\/p>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction It is often desirable by enterprise customers to have standby database cluster\/s for data locality and high performance, disaster recovery and\/or for mere data backups. Couchbase Cross Data Center Replication (XDCR) requires no introduction as customers have been [&hellip;]<\/p>\n","protected":false},"author":33279,"featured_media":8296,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1815,1821,2225,2322],"tags":[],"ppma_author":[9090],"class_list":["post-8294","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-couchbase-architecture","category-cloud","category-kubernetes"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Inter-Kubernetes Network Configuration via VPC Peering<\/title>\n<meta name=\"description\" content=\"This article goes into depth about configuring Inter-Kubernetes networks between Couchbase Clusters in 2 different regions, using a step-by-step approach.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Inter-Kubernetes Networking via VPC Peering\" \/>\n<meta property=\"og:description\" content=\"This article goes into depth about configuring Inter-Kubernetes networks between Couchbase Clusters in 2 different regions, using a step-by-step approach.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-18T16:41:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T06:42:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1428\" \/>\n\t<meta property=\"og:image:height\" content=\"977\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"20 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/\"},\"author\":{\"name\":\"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/21c735da109667147c580bb2cb351c1c\"},\"headline\":\"Inter-Kubernetes Networking via VPC Peering\",\"datePublished\":\"2020-03-18T16:41:44+00:00\",\"dateModified\":\"2025-06-14T06:42:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/\"},\"wordCount\":2901,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png\",\"articleSection\":[\"Best Practices and Tutorials\",\"Couchbase Architecture\",\"Couchbase Capella\",\"Kubernetes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/\",\"name\":\"Inter-Kubernetes Network Configuration via VPC Peering\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png\",\"datePublished\":\"2020-03-18T16:41:44+00:00\",\"dateModified\":\"2025-06-14T06:42:47+00:00\",\"description\":\"This article goes into depth about configuring Inter-Kubernetes networks between Couchbase Clusters in 2 different regions, using a step-by-step approach.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png\",\"width\":1428,\"height\":977},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Inter-Kubernetes Networking via VPC Peering\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/21c735da109667147c580bb2cb351c1c\",\"name\":\"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/5e9708314822fac560c43a5fbdc9b74f\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cb8391905c8ac6ff579c79c90aeaa4e9cf773b87a25e710ee107104c5659deb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cb8391905c8ac6ff579c79c90aeaa4e9cf773b87a25e710ee107104c5659deb6?s=96&d=mm&r=g\",\"caption\":\"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase\"},\"description\":\"Anuj Sahni is a Solutions &amp; Cloud Architecture leader on the Capella team, helping customers design scalable, high-performance enterprise applications and shape their cloud migration journeys using cloud-native technologies and the Couchbase stack. He combines deep expertise in cloud architectures with solutions architecture leadership to help enterprises modernize their applications effectively. Prior to joining Couchbase, Anuj served as Principal Product Manager at Oracle, leading initiatives for Oracle Service Cloud. He brings extensive experience in building distributed, always-available relational and non-relational database systems. Anuj holds an M.S. in Electrical and Computer Engineering from the University of Florida.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/anuj-sahni-6a80b617\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/anujsahni\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Inter-Kubernetes Network Configuration via VPC Peering","description":"This article goes into depth about configuring Inter-Kubernetes networks between Couchbase Clusters in 2 different regions, using a step-by-step approach.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/","og_locale":"en_US","og_type":"article","og_title":"Inter-Kubernetes Networking via VPC Peering","og_description":"This article goes into depth about configuring Inter-Kubernetes networks between Couchbase Clusters in 2 different regions, using a step-by-step approach.","og_url":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/","og_site_name":"The Couchbase Blog","article_published_time":"2020-03-18T16:41:44+00:00","article_modified_time":"2025-06-14T06:42:47+00:00","og_image":[{"width":1428,"height":977,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png","type":"image\/png"}],"author":"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase","Est. reading time":"20 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/"},"author":{"name":"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/21c735da109667147c580bb2cb351c1c"},"headline":"Inter-Kubernetes Networking via VPC Peering","datePublished":"2020-03-18T16:41:44+00:00","dateModified":"2025-06-14T06:42:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/"},"wordCount":2901,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png","articleSection":["Best Practices and Tutorials","Couchbase Architecture","Couchbase Capella","Kubernetes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/","url":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/","name":"Inter-Kubernetes Network Configuration via VPC Peering","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png","datePublished":"2020-03-18T16:41:44+00:00","dateModified":"2025-06-14T06:42:47+00:00","description":"This article goes into depth about configuring Inter-Kubernetes networks between Couchbase Clusters in 2 different regions, using a step-by-step approach.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/03\/xdcr-clusters.png","width":1428,"height":977},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/kubernetes-vpc-peering\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Inter-Kubernetes Networking via VPC Peering"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/21c735da109667147c580bb2cb351c1c","name":"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/5e9708314822fac560c43a5fbdc9b74f","url":"https:\/\/secure.gravatar.com\/avatar\/cb8391905c8ac6ff579c79c90aeaa4e9cf773b87a25e710ee107104c5659deb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cb8391905c8ac6ff579c79c90aeaa4e9cf773b87a25e710ee107104c5659deb6?s=96&d=mm&r=g","caption":"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase"},"description":"Anuj Sahni is a Solutions &amp; Cloud Architecture leader on the Capella team, helping customers design scalable, high-performance enterprise applications and shape their cloud migration journeys using cloud-native technologies and the Couchbase stack. He combines deep expertise in cloud architectures with solutions architecture leadership to help enterprises modernize their applications effectively. Prior to joining Couchbase, Anuj served as Principal Product Manager at Oracle, leading initiatives for Oracle Service Cloud. He brings extensive experience in building distributed, always-available relational and non-relational database systems. Anuj holds an M.S. in Electrical and Computer Engineering from the University of Florida.","sameAs":["https:\/\/www.linkedin.com\/in\/anuj-sahni-6a80b617"],"url":"https:\/\/www.couchbase.com\/blog\/author\/anujsahni\/"}]}},"authors":[{"term_id":9090,"user_id":33279,"is_guest":0,"slug":"anujsahni","display_name":"Anuj Sahni, Solutions &amp; Cloud Architecture Leader, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/cb8391905c8ac6ff579c79c90aeaa4e9cf773b87a25e710ee107104c5659deb6?s=96&d=mm&r=g","author_category":"1","last_name":"Sahni, Solutions & Cloud Architecture Leader, Couchbase","first_name":"Anuj","job_title":"","user_url":"https:\/\/www.linkedin.com\/in\/anuj-sahni-6a80b617","description":"<p data-start=\"231\" data-end=\"963\"><strong data-start=\"231\" data-end=\"963\">Anuj Sahni is a Solutions &amp; Cloud Architecture leader on the Capella team, helping customers design scalable, high-performance enterprise applications and shape their cloud migration journeys using cloud-native technologies and the Couchbase stack. He combines deep expertise in cloud architectures with solutions architecture leadership to help enterprises modernize their applications effectively. Prior to joining Couchbase, Anuj served as Principal Product Manager at Oracle, leading initiatives for Oracle Service Cloud. He brings extensive experience in building distributed, always-available relational and non-relational database systems. Anuj holds an M.S. in Electrical and Computer Engineering from the University of Florida.<\/strong><\/p>"}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/8294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/33279"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=8294"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/8294\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/8296"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=8294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=8294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=8294"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=8294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}