Рет қаралды 2,347
This video demonstrates how to create service mesh using Consul. It shows you how to install consul agents in server mode and in client mode.
Once server and clients are created you can register your services and communicate with them for the purpose of service discovery.
Find instruction to install Consul Here:
github.com/leo...
Sending Request to Register and Deregister services:
1. Register :
curl -X PUT {data} localhost:8500/v1/agent/service/register
-d '{"ID": "Service1", "Name": "MyService", "Port" : 5001, "Check": {"id": "Check1", "HTTP": "localhost:5001/health", "interval": "1s"}}'
curl -X PUT -d '{"ID": "Service1", "Name": "MyService", "Port" : 5001, "Check": {"id": "Check1", "HTTP": "localhost:5001/health", "interval": "1s"}}' localhost:8500/v1/agent/service/register
2. Deregister:
curl --request PUT localhost:8500/v1/agent/service/deregister/{serviceID}