host文件的故事
作者:
白敏鸢 | 来源:发表于
2018-04-19 08:58 被阅读0次最近在给一个team部署k8s的时候发现他们的rc.svc文件中的配置是写死的
比如
- name: core_ip
value:https://x.x.x.x:port
测试的同学拿一个版本的时候,去publish都要再改一次很不方便
查询的时候发现可以使用hosts文件修改。
cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 localhost.localdomain localhost
192.168.1.195 debian.localdomain debian
添加我们的core服务的ip与域名
x.x.x.x core_ip
ps:这里配置的时候一定不要加端口号,具体的服务在rc,svc中修改
测试一下
ping core_ip
ok.重新部署k8s服务
binggo
本文标题:host文件的故事
本文链接:https://www.haomeiwen.com/subject/ntmikftx.html
网友评论