On Monday, February 27, 2017 at 1:13:11 PM UTC+8, edenxia wrote: > hi, we are working on k8s evaluation. we encountered and issue for stateful > service replication. > > let's say psql as an exmaple. what we are trying to achieve are two > scenario as below > 1. psql master on k8s cluster on cloud ZoneA and psql slave on k8s cluster on > ZoneB. psql master need communicate with psql slave and vice visa. > 2. psql cluster on cloud region A need communicate with psql cluster on > region B via VPN(or other internal channel) > > for scenario 1, we may achieve via setting up one cluster across multiple > zones. > for scenario 2, we do not see any proper solution. > 1)one possible solution is to expose services via loadbalancer. but it is > public loadbalancer, we are not willing to do it due to security region. > 2)another possible solution is to use NodePort. but it is also not ideal. > 3) we also checked ingress. but it is L7 loadbalancer. so also not > suitable for this scenario. > > so, is there any solution (or similar) which can expose service/pod via > internal IPs to be accessed by other resources outside of cluster. > > > sorry if this is duplicating question.
more findings. we tried on gke. (it should work on gce.not tested yet). so by default, pod and node can talk to each other across different clusters. to have pod and node to talk to service across clusters, just simply add one route to point service ip range to one working node in the cluster. need add a script to route to another working node if the one(we used as temp router) fail. at least it resolve what we required on gke so far. -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.
