|
2 | 2 |
|
3 | 3 | Here is a recommended multi-cluster architecture if you'd like to setup kubernetes service-to-service communications across multiple clusters. |
4 | 4 |
|
5 | | -Suppose your organization would like to have one large infrastructure that have many clusters in one AWS account, this service mesh should include the following components: |
| 5 | +Suppose your organization would like to have one large infrastructure that have many clusters in one AWS account. It's recommended your infrastructure includes the following components: |
6 | 6 | - One manually created VPC Lattice service network, (it could create by either AWS Console, CLI, CloudFormation, Terraform or any other tools) |
7 | 7 | - Create `VpcServiceNetworkAssociations` between VPC Lattice service network and each config cluster's VPC and workload clusters' VPCs |
8 | 8 | - Multiple workload cluster(s), that are used to run application workload(s). Workload cluster(s) should only have following workloads related kubernetes objects: |
9 | 9 | - Application workload(s) (Pods, Deployments etc.) |
10 | 10 | - `Service(s)` for application workload(s) |
11 | 11 | - `ServiceExport(s)`, that export kubernetes application Service(s) to the "config cluster" |
12 | | -- One extra dedicated "config cluster", which is act as a "service mesh control plane" and it should include following kubernetes objects: |
| 12 | +- One extra dedicated "config cluster", which is act as a "service network control plane" and it should include following kubernetes objects: |
13 | 13 | - One `Gateway` that has __same name__ as the manually created VPC Lattice service network name |
14 | 14 | - `ServiceImport(s)`, that reference to kubernetes application services that export from workload cluster(s) |
15 | 15 | - `HTTPRoute(s)`,`GRPCRoute(s)`, that have rules backendRefs to `ServiceImport(s)` that referring kubernetes application service(s) in workload cluster(s) |
16 | 16 |
|
17 | 17 |
|
| 18 | +Above architecture is recommended for following reasons: |
| 19 | +- Put all Route(s) and one Gateway only in the config cluster is easier to manage and have less chance to have conflict. |
| 20 | +- You could have seperated roles in your organization. The infra operator team only manage the resource in the config cluster, and the app developer team only manage the resource in the workload cluster(s). |
| 21 | + |
18 | 22 | You can see this similar production use case at Airbnb: [airbnb mullti-cluster setup](https://www.youtube.com/watch?v=1D8lg36ZNHs) |
19 | 23 |
|
20 | 24 |  |
21 | 25 |
|
22 | | -Following steps will show you how to set up this recommended multi-cluster architecture with 1 config cluster and 2 workload clusters. |
| 26 | +Following steps show you how to set up this recommended multi-cluster architecture with 1 config cluster and 2 workload clusters. |
23 | 27 | 1. Create 3 k8s clusters: `config cluster`, `workload cluster-1`, `workload cluster-2`. Install AWS gateway api controller in each cluster, you could follow this instruction [deploy.md](deploy.md) |
24 | 28 | 1. Create a VPC Lattice `ServiceNetwork` with name `my-gateway` |
25 | 29 | 1. Create `VPCServiceNetworkAssociation(s)` between previous step created service network and each config cluster's VPC and workload clusters' VPCs |
|
0 commit comments