Created
October 5, 2018 09:58
-
-
Save YEMEAC/9a0d8938a38a1722ad3b956cc57fbe97 to your computer and use it in GitHub Desktop.
register and delete service in consul with curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT \ | |
http://127.0.0.1:8500/v1/catalog/register \ | |
-H 'cache-control: no-cache' \ | |
-H 'content-type: application/json' \ | |
-H 'postman-token: 9aa3163f-31b9-8c8f-f9cd-6feaca81d4ce' \ | |
-d '{ | |
"Datacenter": "dc1", | |
"Node": "externalServices", | |
"Address": "172.30.50.59", | |
"Service": { | |
"ID": "transporter-service", | |
"Service": "transporter-service", | |
"Address": "172.30.50.59", | |
"Port": 29487 | |
}, | |
"Check": { | |
"Node": "externalServices", | |
"CheckID": "service:transporter-service", | |
"Status": "passing", | |
"ServiceID": "transporter-service" | |
} | |
}' | |
curl -X PUT \ | |
http://127.0.0.1:8500/v1/catalog/deregister \ | |
-d '{ | |
"ServiceID": "transporter-Service", | |
"node": "externalServices" | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment