Is it possible with K8s to create the stateful replica set across region,i want to have the MongoDB replica set across various regions, suppose i wanted to create the 3 memeber mongoDB replica set:
Member 1: us-east
Member 2: eu-west
Member 3: ca-central
Will it be possible with kubernetes statefulsets and Headless Service?
I dont think you can setup a statefulset object across regions. Instead you can deploy across availability zones. Create a kubernetes cluster with three node pools one each in different availability zone. You can distribute the mongodb statefulset across the three nodepools.
If your requirement is to have the mongodb cluster across region then consider separate mongodb cluster in each region and then have a mechanism to replicate the data between the two clusters.