Policies
Learn more about the custom resources that you can use to apply policies in kgateway.
While the Kubernetes Gateway API allows you to do simple routing, such as to match, redirect, or rewrite requests, you might want additional capabilities in your API gateway, such direct responses, local rate limiting, or request and response transformations. Policies allow you to apply intelligent traffic management, resiliency, and security standards to an HTTPRoute or Gateway.
Policy CRDs
Kgateway uses the following custom resources to attach policies to routes and gateway listeners.
Directly respond to incoming requests with a custom HTTP response code and body.
Apply policies to all HTTP and HTTPS listeners.
Attach policies to routes in an HTTPRoute or Gateway resource.
Supported policies
Review the policies that you can configure in kgateway and the level at which you can apply them.
Policy | Applied via |
---|---|
Access logging | HTTPListenerPolicy |
Direct response | DirectResponse |
External authorization | GatewayExtension and TrafficPolicy |
External processing (ExtProc) | TrafficPolicy |
Local rate limiting | TrafficPolicy |
Transformations | TrafficPolicy |