Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
register and delete service in consul with curl
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
You can’t perform that action at this time.