Fork me on GitHub

consul注销服务节点

命令
http://IP:8500/v1/agent/service/deregister/ApiName
 
例如:
target.api服务部署在192.168.15.10
在consul中的服务节点名称是target.api-192.168.15.10
注销命令如下:
http://192.168.15.10:8500/v1/agent/service/deregister/target.api-192.168.15.10
 
命令执行可使用能发送PUT方式的工具,如powershell、fiddler
PS C:\Windows\system32>curl -URI http://192.168.15.10:8500/v1/agent/service/deregister/target.api-192.168.15.10 -Method PUT


StatusCode        : 200
StatusDescription : OK
Content           : {}
RawContent        : HTTP/1.1 200 OK
                    Vary: Accept-Encoding
                    Content-Length: 0
                    Date: Tue, 10 Sep 2019 10:55:27 GMT


Headers           : {[Vary, Accept-Encoding], [Content-Length, 0], [Date, Tue, 10 Sep 2019 10:55:27 GMT]}
RawContentLength  : 0



PS C:\Windows\system32>

 

posted @ 2019-08-30 09:45  chenpw  阅读(1311)  评论(0)    收藏  举报
View Code