Tasks for Envoy Gateway
TOC
Prerequisites
Introduction
When applying configuration changes in the Gateway API, there are three primary approaches available:
- Direct modification of the HTTP/TCP/UDP Route or
Gateway. - Modification through PolicyAttachment provided by
Gateway ApiandEnvoy Gateway. - Modification on the global configuration level of the
envoy-gateway instance.
HTTP/TCP/UDP Route
PolicyAttachment Via TargetRefs
Envoy Gateway provides a rich custom policy mechanism that can be attached to gateway resources through the Gateway API's PolicyAttachment model.
Envoy Gateway policies are divided into multiple types, including security policies, traffic management policies and more. These policies can be applied to different levels of resources, such as Gateway, HTTPRoute, or Service.
The Gateway API's PolicyAttachment mechanism allows users to attach policies to gateway resources in a declarative way. This mechanism is implemented through the targetRefs field, which specifies the target resource for policy application. For example, policies can be attached to specific Gateways, HTTPRoutes, or Services.
Policy types supported by Envoy Gateway include:
Using the PolicyAttachment mechanism, users can flexibly add, modify, or delete policies without modifying core resource definitions, achieving separation of concerns and better resource management.
Global Configuration
The configuration related to envoy-gateway instance itself or global-level configuration related to all gateways belongs to this envoy-gateway instance, such as deployment mode or backend routing.
We recommend using EnvoyGatewayCtl to manage those global configurations.
Common Tasks For Route Config
Advanced Configuration
OpenTelemetry(Otel)
Please follow instructions in OpenTelemetry Integration, but use EnvoyGatewayCtl to modify the envoy-gateway-config.
How To Attach to Listener Created In Other Namespace
In the Gateway's listener configuration, you need to specify which namespaces are allowed to attach Routes to it.
Please refer to Cross-Namespace routing for more details.
How To Use Cert Created In Other Namespace
To use a certificate created in another namespace, you need to create a ReferenceGrant in the namespace where the certificate is created. Please follow instructions in cross-namespace-certificate-references and referencegrant.
You cannot specify individual secret resources; you must allow the entire namespace
How To Use SSL passthrough
Please follow instructions in
How To Change SSL Cipher
Please follow instructions in customize-gateway-tls-parameters
the .spec.tls in ClientTrafficPolicy is clienttlssettings
How To Specify NodePort When Using NodePort Service
When using a NodePort service, kubernetes assigns a NodePort port number to each service port. When accessing the service through a node IP, you should use the corresponding NodePort port number rather than the service port.
There are two approaches to handle this:
Manually retrieve the NodePort assignment by following get nodeport from svc port
Manually specify the NodePort in the EnvoyProxy configuration instead of letting Kubernetes automatically assign it.
- Use patch field to patch the generated service resource to specify the NodePort
NodePort can only be within a specific range, typically 30000-32767. If you want the Gateway listener port and NodePort to be consistent, your listener port must also be within the NodePort range.
How To Add Pod Annotation in EnvoyGateway
How To Set NodeSelector And Tolerations For envoy-gateway-operator
update the Subscription resources
How To Set NodeSelector And Tolerations For envoy-gateway
update the EnvoyGatewayCtl resources
How To Set NodeSelector And Tolerations For envoy-proxy
update the EnvoyProxy resources
More configuration
Please refer to EnvoyGateway Tasks