Proper use of syncgw @k8s with statefullset

Hello. We are experiencing some issue with our deployment of syncgw statefull set @k8s cluster.
What is the best practise for scaling syncgw @ k8s?
We have k8s service above statefullset of 2 replicas od syncgw and experiencing random cache issues.
Documentation is giving information about need of sending communication from balancer to all replicas at once. Dunno if this is even possible @ k8s, maybe via ingress (nginx).
Problem is also with calling _compact on syncgw via balancer. It is purging tombstone from replica selected by balancer, but other replicas stays intact.
Our configs: https://gist.github.com/erikbotta/64730f90168d1f5b69dddedb89915ed3

Please refer to our blog and tutorial on how to set up Couchbase Sync Gateway cluster fronted by a load balancer on k8s.

OK, thank you. I’ll give it a try.

Am I missing something, or did this ignore how to handle the sync function? Do I have to maintain in both configs or is there a better way?

All sync gateways in a cluster must be configured with exact same sync function (this is independent of whether its deployed on k8s or not). With exception of import processing all nodes are homogeneous in config.