Sync mode
As shown in the diagram below, User A and User B use the kubevpn sync command to sync the same
service authors:
- User A:
kubevpn sync deployment/authors --headers user=A --sync ~/code:/app/code - User B:
kubevpn sync deployment/authors --headers user=B --sync ~/code:/app/code
When the authors service in the cluster receives traffic:
- Traffic with
user: Ain theHTTP headerwill hit the sync serviceauthors'. - Traffic with
user: Bin theHTTP headerwill hit the sync serviceauthors''. - Unmatched traffic in the
HTTP headerwill hit the originalauthorsservice in the cluster.
File synchronization is implemented using syncthing:
- The
~/codeon user A's computer will be synchronized to the/app/codedirectory of the sync resourceauthors'in the cluster. - The
~/codeon user B's computer will be synchronized to the/app/codedirectory of the sync resourceauthors''in the cluster.