GRPCRoute API Reference¶
With integration of the Gateway API, AWS Gateway API Controller supports
This allows you to define and manage the routing of gRPC traffic within your Kubernetes cluster.
GRPCRoute Key Features & Limitations¶
- Routing Traffic: Enables routing gRPC traffic to servers within your Kubernetes cluster.
- Service and Method Matching: The
GRPCRouteallows for matching by:
- An exact gRPC service and method.
- An exact gRPC service without specifying a method.
- All gRPC services and methods.
- Header Matching: Enables matching based on specific headers in the gRPC request.
- Listener Protocol: The
GRPCRoutesectionName must refer to an HTTPS listener in the parent
- Service Export: The
GRPCRoutedoes not support integration with
- Method Matches: One method match is allowed within a single rule.
- Header Matches Limit: A maximum of 5 header matches per rule is supported.
- No Method Without Service: Matching only by a gRPC method without specifying a service is not supported.
- Case Insensitivity: All method matches are currently case-insensitive.
application-networking.k8s.aws/lattice-assigned-domain-nameRepresents a VPC Lattice generated domain name for the resource. This annotation will automatically set when a
GRPCRouteis programmed and ready.
Here is a sample configuration that demonstrates how to set up a
GRPCRoute for a HelloWorld gRPC service:
apiVersion: gateway.networking.k8s.io/v1alpha2 kind: GRPCRoute metadata: name: greeter-grpc-route spec: parentRefs: - name: my-hotel sectionName: https rules: - matches: - headers: - name: testKey1 value: testValue1 backendRefs: - name: greeter-grpc-server kind: Service port: 50051 weight: 10 - matches: - method: service: helloworld.Greeter method: SayHello backendRefs: - name: greeter-grpc-server kind: Service port: 443
In this example:
greeter-grpc-routeand is associated with a parent gateway named
my-hotelthat has a section named
- The first routing rule is set up to forward traffic to a backend service named
50051. The rule also specifies a header match condition, where traffic must have a header with the name
testValue1for the routing rule to apply.
- The second rule matches gRPC traffic for the service
SayHello, forwarding it to the
GRPCRoute documentation provides a detailed introduction, feature set, and a basic example of how to configure
and use the resource within AWS Gateway API Controller project. For in-depth details and specifications, you can refer to the
official Gateway API documentation.