时间:2023-02-07 09:24:01 | 来源:建站知识
时间:2023-02-07 09:24:01 来源:建站知识
在我开发的项目notr内网穿透当中引入DNS来解决一个问题:notr.tech { etcd { path /skydns endpoint http://localhost:2379 upstream } log}
➜ bin git:(master) ./etcdctl put /skydns/tech/notr/yingjiu/ '{"host":"192.168.1.2"}'OK➜ bin git:(master) nslookup yingjiu.notr.tech 127.0.0.1Server: 127.0.0.1Address: 127.0.0.1#53Name: yingjiu.notr.techAddress: 192.168.1.2➜ bin git:(master) ./etcdctl put /skydns/tech/notr/yingjiu/ '{"host":"192.168.1.3"}'OK➜ bin git:(master) nslookup yingjiu.notr.tech 127.0.0.1Server: 127.0.0.1Address: 127.0.0.1#53Name: yingjiu.notr.techAddress: 192.168.1.3➜ bin git:(master)
接下来只需要在registry将etcd client集成进去即可,改造完之后整个软件变成了下图所示的流程。关键词:动态,实现