You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Include review comments in user guide
* Update k8s version numbers on two figures
* Small fixes
* More small fixes
* Fixed typo
* Small rewording
* Another typo
Copy file name to clipboardExpand all lines: docs/how-it-works.md
+34-55Lines changed: 34 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
# AWS Gateway API Controller User Guide
2
2
3
-
The AWS Gateway API Controller lets you connect services across multiple Kubernetes clusters, EC2 instances, containers, and serverless functions through a Gateway API interface.
4
-
It does this by leveraging AWS VPC Lattice, which handles the connections to the AWS infrastructure, and Kubernetes Gateway API calls to manage Kubernetes objects.
3
+
The AWS Gateway API Controller lets you connect services across multiple Kubernetes clusters through the Kubernetes Gateway API interface.
4
+
It is also designed to connect services running on EC2 instances, containers, and as serverless functions.
5
+
It does this by leveraging Amazon VPC Lattice, which works with Kubernetes Gateway API calls to manage Kubernetes objects.
5
6
6
7
This document describes how to set up the AWS Gateway API Controller and provides example use cases.
7
8
With the controller deployed and running, you will be able to manage services for multiple Kubernetes clusters and other targets on AWS through the following:
8
9
9
-
***CLI**: Use `aws` and `eksctl` to create clusters and set up AWS policies. Use `helm` to deploy the controller. Then use `kubectl` and YAML files to set up Kubernetes objects.
10
+
***CLI**: Use `aws` and `eksctl` to create clusters and set up AWS policies. Then use `kubectl` and YAML files to set up Kubernetes objects.
10
11
***AWS Console**: View VPC Lattice assets through the VPC area of the AWS console.
11
12
12
13
While separating the application developer from the details of the underling infrastructure, the controller also provides a Kubernetes-native experience, rather than creating a lot of new AWS ways of managing services.
@@ -15,7 +16,9 @@ This lets you work with Kubernetes service-related resources using Kubernetes AP
15
16
16
17
For more information on this technology, see [Kubernetes Gateway API](https://gateway-api.sigs.k8s.io/).
17
18
18
-
**NOTE**: If you are new to the VPC Lattice service, keep in mind that names you use for objects must be unique across your entire account and not just across each cluster used by that account.
19
+
A few things to keep in mind:
20
+
* If you are new to the VPC Lattice service, keep in mind that names you use for objects must be unique across your entire account and not just across each cluster used by that account.
21
+
* Your AWS CNI must be v1.8.0 or later to work with VPC Lattice.
19
22
20
23
## Deploying the Gateway API Controller
21
24
@@ -26,7 +29,7 @@ Run through them again for a second cluster to use with the extended example sho
1. Configure security group: To receive traffic from the VPC Lattice fleet, all Pods MUST explicitly configure a security group to allow traffic from the 169.254.171.0/24 address range.
32
+
1. Configure security group: To receive traffic from the VPC Lattice fleet, you must set up security groups so that they allow all Pods communicating with VPC Lattice to allow traffic on all ports from the 169.254.171.0/24 address range. See [Control traffic to resources using security groups](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html) for details.
30
33
31
34
1. Create an IAM OIDC provider: See [Creating an IAM OIDC provider for your cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html) for details.
32
35
```bash
@@ -88,7 +91,7 @@ The second section extends that example by creating another inventory service on
88
91
89
92
This example creates a single cluster in a single VPC, then configures two routes (rates and inventory) and three services (parking, review, and inventory-1). The following figure illustrates this setup:
1. Use the VPC Lattice CLI to find the DNS name. You can use the `curl` command to get information about each service by adding the service name to the end of the HTTPRoute DNS name. Those names are gathered from AWS Route53 instead of Kubernetes CoreDNS.
Requesting to Pod(inventory-ver1-7bb6989d9d-2p2hk): inventory-ver1 handler pod
221
+
```
239
222
### Set up multi-cluster/multi-VPC service-to-service communications
240
223
241
224
This sections builds on the previous section by migrating a Kubernetes service (HTTPRoute inventory) from one Kubernetes cluster to a different Kubernetes cluster.
242
225
For example, it will:
243
226
244
-
* Migrate the Kubernetes inventory service from a Kubernetes v1.19 cluster to a Kubernetes v1.21 cluster in a different VPC.
227
+
* Migrate the Kubernetes inventory service from a Kubernetes v1.21 cluster to a Kubernetes v1.23 cluster in a different VPC.
245
228
* Scale up the Kubernetes inventory service to run it in another cluster (and another VPC) in addition to the current cluster.
246
229
247
230
The following figure illustrates this:
@@ -270,12 +253,11 @@ The following figure illustrates this:
270
253
```bash
271
254
kubectl config use-context <yourcluster2info>
272
255
```
273
-
274
-
1. Import the Kubernetes inventory-ver2 into first cluster (Note: only if you have a single cloud desktop):
256
+
1. Import the Kubernetes inventory-ver2 into first cluster:
Requsting to Pod(inventory-ver2-7bb6989d9d-2p2hk): inventory-ver2 handler pod <----> in 2nd cluster
279
+
Requesting to Pod(inventory-ver2-7bb6989d9d-2p2hk): inventory-ver2 handler pod <----> in 2nd cluster
298
280
```
299
281
## Understanding the Gateway API Controller
300
282
@@ -308,7 +290,7 @@ Someone wanting to run an application that is spread out in this way might find
308
290
* Network connectivity and traffic routing
309
291
310
292
This is not a new problem.
311
-
A common approach to interconnecting services that span multiple VPCs is to use service meshes, such as Istio or AWS App Mesh. But these require sidecars, which can introduce scaling problems and present their own management challenges.
293
+
A common approach to interconnecting services that span multiple VPCs is to use service meshes. But these require sidecars, which can introduce scaling problems and present their own management challenges.
312
294
313
295
If you just want to run an application, you should be shielded from details needed to find assets across what are essentially multiple virtual data centers (represented by multiple VPCs). You should also have consistent ways of working with assets across your VPCs, even if those assets include different combinations of instances, clusters, containers, and serverless. And while making it simpler to run multi-VPC applications easier for users, administrators still need the tools to control and audit their resources to suit their company’s compliance needs.
314
296
@@ -366,6 +348,3 @@ Notice that the Kubernetes Gateway API syntax is used to create the gateway, HTT
366
348
* Application developer: Creates HTTPRoute objects that point to Kubernetes services, which in turn are directed to particular pods, in this case.
367
349
This is all done by checking the related VPC Lattice Services (and related policies), Target Groups, and Targets
368
350
Keep in mind that Target Groups v1 and v2 can be on different clusters in different VPCs.
0 commit comments