Skip to content

Instantly share code, notes, and snippets.

@rerorero
Last active November 4, 2019 23:41
Show Gist options
  • Save rerorero/6944ec42c2911b0268f2e232c984dc60 to your computer and use it in GitHub Desktop.
Save rerorero/6944ec42c2911b0268f2e232c984dc60 to your computer and use it in GitHub Desktop.
consul connect example
☁ consul-playground consul catalog services
consul
socat
socat-sidecar-proxy
web
web-sidecar-proxy
[
{
"ID": "1cedd739-256a-bd5a-0d80-498abfb96c5f",
"Node": "machine",
"Address": "127.0.0.1",
"Datacenter": "dc1",
"TaggedAddresses": {
"lan": "127.0.0.1",
"wan": "127.0.0.1"
},
"NodeMeta": {
"consul-network-segment": ""
},
"ServiceKind": "connect-proxy",
"ServiceID": "socat-sidecar-proxy",
"ServiceName": "socat-sidecar-proxy",
"ServiceTags": [],
"ServiceAddress": "",
"ServiceWeights": {
"Passing": 1,
"Warning": 1
},
"ServiceMeta": {},
"ServicePort": 21000,
"ServiceEnableTagOverride": false,
"ServiceProxy": {
"DestinationServiceName": "socat",
"DestinationServiceID": "socat",
"LocalServiceAddress": "127.0.0.1",
"LocalServicePort": 8181,
"MeshGateway": {},
"Expose": {}
},
"ServiceConnect": {},
"CreateIndex": 12,
"ModifyIndex": 12
}
]
[
{
"ID": "1cedd739-256a-bd5a-0d80-498abfb96c5f",
"Node": "machine",
"Address": "127.0.0.1",
"Datacenter": "dc1",
"TaggedAddresses": {
"lan": "127.0.0.1",
"wan": "127.0.0.1"
},
"NodeMeta": {
"consul-network-segment": ""
},
"ServiceKind": "",
"ServiceID": "socat",
"ServiceName": "socat",
"ServiceTags": [],
"ServiceAddress": "",
"ServiceWeights": {
"Passing": 1,
"Warning": 1
},
"ServiceMeta": {},
"ServicePort": 8181,
"ServiceEnableTagOverride": false,
"ServiceProxy": {
"MeshGateway": {},
"Expose": {}
},
"ServiceConnect": {},
"CreateIndex": 13,
"ModifyIndex": 13
}
]
[
{
"ID": "1cedd739-256a-bd5a-0d80-498abfb96c5f",
"Node": "machine",
"Address": "127.0.0.1",
"Datacenter": "dc1",
"TaggedAddresses": {
"lan": "127.0.0.1",
"wan": "127.0.0.1"
},
"NodeMeta": {
"consul-network-segment": ""
},
"ServiceKind": "connect-proxy",
"ServiceID": "web-sidecar-proxy",
"ServiceName": "web-sidecar-proxy",
"ServiceTags": [],
"ServiceAddress": "",
"ServiceWeights": {
"Passing": 1,
"Warning": 1
},
"ServiceMeta": {},
"ServicePort": 21001,
"ServiceEnableTagOverride": false,
"ServiceProxy": {
"DestinationServiceName": "web",
"DestinationServiceID": "web",
"LocalServiceAddress": "127.0.0.1",
"LocalServicePort": 8080,
"Upstreams": [
{
"DestinationType": "service",
"DestinationName": "socat",
"Datacenter": "",
"LocalBindPort": 9191,
"Config": null,
"MeshGateway": {}
}
],
"MeshGateway": {},
"Expose": {}
},
"ServiceConnect": {},
"CreateIndex": 26,
"ModifyIndex": 26
}
]
[
{
"ID": "1cedd739-256a-bd5a-0d80-498abfb96c5f",
"Node": "machine",
"Address": "127.0.0.1",
"Datacenter": "dc1",
"TaggedAddresses": {
"lan": "127.0.0.1",
"wan": "127.0.0.1"
},
"NodeMeta": {
"consul-network-segment": ""
},
"ServiceKind": "",
"ServiceID": "web",
"ServiceName": "web",
"ServiceTags": [],
"ServiceAddress": "",
"ServiceWeights": {
"Passing": 1,
"Warning": 1
},
"ServiceMeta": {},
"ServicePort": 8080,
"ServiceEnableTagOverride": false,
"ServiceProxy": {
"MeshGateway": {},
"Expose": {}
},
"ServiceConnect": {},
"CreateIndex": 25,
"ModifyIndex": 25
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment