Chapter 10. Advanced Use Cases
This chapter examines advanced use cases for Consul and addresses areas I didn’t have space to cover in depth.
Multi-cluster Federation
Consul supports being installed across multiple Kubernetes and VM clusters. Each cluster is called a Consul datacenter. Once installed across multiple clusters, you can easily and securely route traffic between clusters.
The Consul terminology for connecting multiple clusters is federation. Federation is accomplished through the use of Consul mesh gateways: essentially load balancers that are routable between clusters and through which all traffic flows, as shown in Figure 10-1.
There are many use cases for multi-cluster federation:
-
Connecting an on-premises datacenter running VMs with cloud-managed Kubernetes clusters
-
Running multiple clusters for redundancy and configuring failover rules to route to other clusters in the event of failure
-
Giving teams their own clusters (to reduce blast radiuses) while still enabling them to call services in other clusters
Intentions (Consul’s authorization rules covered in Chapter 6) work across clusters, so you can ensure services are only talking to services in other clusters that they’re authorized to.
To get started with multi-cluster federation, follow the instructions for Kubernetes or the ...
Get Consul: Up and Running now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.