One of the beneficial features of Consul is that you can have a hybrid service mesh that can span multiple data centers, Kubernetes clusters, VMs, or just bare-metal servers.
Though it does not serve any useful purpose in a single node, we will use consul at the VM level and join the Kubernetes cluster, which is running three servers, just as a demonstration to show the Consul method of service discovery and spanning multiple heterogeneous environments. In our demonstration environment, which is running on a single VM node, we'll simulate a VM and a Kubernetes cluster running three Consul servers. Let's get started:
- Find out the endpoints for consul-server:
$ kubectl -n consul get epNAME ENDPOINTS AGEconsul-connect-injector-svc ...