|
| 1 | +# Gateway API Reference |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +`Gateway` allows you to configure network traffic through AWS Gateway API Controller. |
| 6 | +When a Gateway is defined with `amazon-vpc-lattice` GatewayClass, the controller will watch for the gateway |
| 7 | +and the resources under them, creating required resources under Amazon VPC Lattice. |
| 8 | + |
| 9 | +Internally, a Gateway points to a VPC Lattice [service network](https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-networks.html). |
| 10 | +Service networks are identified by Gateway name (without namespace) - for example, a Gateway named `my-gateway` |
| 11 | +will point to a VPC Lattice service network `my-gateway`. If multiple Gateways share the same name, all of them |
| 12 | +will point to the same service network. |
| 13 | + |
| 14 | +VPC Lattice service networks must be managed separately, as it is a broader concept that can cover resources |
| 15 | +outside the Kubernetes cluster. To create and manage a service network, you can either: |
| 16 | + |
| 17 | +- Specify `DEFAULT_SERVICE_NETWORK` configuration option on the controller. This will make the controller |
| 18 | + to create a service network with such name, and associate the cluster VPC to it for you. This is suitable |
| 19 | + for simple use cases with single service network. |
| 20 | +- Manage service networks outside the cluster, using AWS Console, CDK, CloudFormation, etc. This is recommended |
| 21 | + for more advanced use cases that cover multiple clusters and VPCs. |
| 22 | + |
| 23 | +Gateways with `amazon-vpc-lattice` GatewayClass do not create a single entrypoint to bind Listeners and Routes |
| 24 | +under them. Instead, each Route will have its own domain name assigned. To see an example of how domain names |
| 25 | +are assigned, please refer to our [Getting Started Guide](../guides/getstarted.md). |
| 26 | + |
| 27 | +### Supported GatewayClass |
| 28 | +- `amazon-vpc-lattice` |
| 29 | + This is the default GatewayClass for managing traffic using Amazon VPC Lattice. |
| 30 | + |
| 31 | +### Limitations |
| 32 | +- GatewayAddress status does not represent all accessible endpoints belong to a Gateway. |
| 33 | + Instead, you should check annotations of each Route. |
| 34 | +- Only `Terminate` is supported for TLS mode. TLSRoute is currently not supported. |
| 35 | +- TLS certificate cannot be provided through `certificateRefs` field by `Secret` resource. |
| 36 | + Instead, you can create an ACM certificate and put its ARN to the `options` field. |
| 37 | + |
| 38 | +## Example Configuration |
| 39 | + |
| 40 | +Here is a sample configuration that demonstrates how to set up a `Gateway`: |
| 41 | + |
| 42 | +```yaml |
| 43 | +apiVersion: gateway.networking.k8s.io/v1beta1 |
| 44 | +kind: Gateway |
| 45 | +metadata: |
| 46 | + name: my-hotel |
| 47 | +spec: |
| 48 | + gatewayClassName: amazon-vpc-lattice |
| 49 | + listeners: |
| 50 | + - name: http |
| 51 | + protocol: HTTP |
| 52 | + port: 80 |
| 53 | + - name: https |
| 54 | + protocol: HTTPS |
| 55 | + port: 443 |
| 56 | + tls: |
| 57 | + mode: Terminate |
| 58 | + certificateRefs: |
| 59 | + - name: unused |
| 60 | + options: |
| 61 | + application-networking.k8s.aws/certificate-arn: <certificate-arn> |
| 62 | +``` |
| 63 | +
|
| 64 | +The created Gateway will point to a VPC Lattice service network named `my-hotel`. Routes under this Gateway can have |
| 65 | +either `http` or `https` listener as a parent based on their desired protocol to use. |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +This `Gateway` documentation provides a detailed introduction, feature set, and a basic example of how to configure |
| 70 | +and use the resource within AWS Gateway API Controller project. For in-depth details and specifications, you can refer to the |
| 71 | +official [Gateway API documentation](https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.Gateway). |
0 commit comments