Geo-Redundancy:-
...
For achieving this we used a 4 node setup as shown below
And we used the default labels provided by kubernetes to each nodes
AntiAffinity between DB Pods
...
When the code was deployed the result was as below
default goodly-squid-vnfsdk-556f59ccd9-jx9q8 1/1 Running 0 32s 10.42.81.107 k8s-4
default goodly-squid-vnfsdk-556f59ccd9-n95jh 1/1 Running 0 32s 10.42.73.55 k8s-2
default goodly-squid-vnfsdk-556f59ccd9-snlzc 1/1 Running 0 32s 10.42.233.242 k8s-3
default goodly-squid-vnfsdk-556f59ccd9-xtzff 1/1 Running 0 32s 10.42.129.25 k8s-1
default goodly-squid-vnfsdk-postgres-78d58775c4-98dr9 1/1 Running 0 32s 10.42.130.80 k8s-4
default goodly-squid-vnfsdk-postgres-78d58775c4-9cf5g 1/1 Running 0 32s 10.42.222.207 k8s-3
default goodly-squid-vnfsdk-postgres-78d58775c4-9rnhh 1/1 Running 0 32s 10.42.50.224 k8s-1
default goodly-squid-vnfsdk-postgres-78d58775c4-s4l8r 1/1 Running 0 32s 10.42.49.238 k8s-2
Replica sets on different nodes with the APP and DB on the same node while the APP and DB are also never colocated on the same node
K8s-1 | k8s-2 | k8s-3 | k8s-4 |
---|---|---|---|
goodly-squid-vnfsdk-556f59ccd9-xtzff | goodly-squid-vnfsdk-556f59ccd9-n95jh | goodly-squid-vnfsdk-556f59ccd9-snlzc | goodly-squid-vnfsdk-556f59ccd9-jx9q8 |
goodly-squid-vnfsdk-postgres-78d58775c4-9rnhh | goodly-squid-vnfsdk-postgres-78d58775c4-s4l8r | goodly-squid-vnfsdk-postgres-78d58775c4-9cf5g | goodly-squid-vnfsdk-postgres-78d58775c4-98dr9 |
So with this, We achieved a deployment Active-Active Geo-redundancy.
...