同步模式
如下图所示,用户 A 和 用户 B,分别使用了 kubevpn sync
命令同步了同一个服务 authors:
- 用户 A:
kubevpn sync deployment/authors --headers user=A --sync ~/code:/app/code - 用户 B:
kubevpn sync deployment/authors --headers user=B --sync ~/code:/app/code
当集群中的 authors 服务收到流量时:
HTTP header中带有user: A的流量会击中同步的服务authors'HTTP header中带有user: B的流量会击中同步的服务authors''HTTP header中不匹配的流量会击中集群中原始的authors服务
使用 syncthing 实现了文件同步:
- 用户 A 电脑上的
~/code会被同步到集群中同步的资源authors'的/app/code目录中 - 用户 B 电脑上的
~/code会被同步到集群中同步的资源authors''的/app/code目录中