Timeout
This policy enables Kuma to set timeouts on the outbound connections depending on the protocol.
Usage
Specify the proxy to configure with the sources selector, and the outbound connections from the proxy with the destinations selector.
The policy lets you configure timeouts for HTTP, GRPC, and TCP protocols.
Example
apiVersion: kuma.io/v1alpha1kind: Timeoutmesh: defaultmetadata:name: timeouts-backendspec:sources:- match:kuma.io/service: '*'destinations:- match:kuma.io/service: 'backend_default_svc_80'conf:# connectTimeout defines time to establish connection, 'connect_timeout' on Cluster, default 10sconnectTimeout: 10stcp:# 'idle_timeout' on TCPProxy, disabled by defaultidleTimeout: 1hhttp:# 'timeout' on Route, disabled by defaultrequestTimeout: 5s# 'idle_timeout' on Cluster, disabled by defaultidleTimeout: 1hgrpc:# 'stream_idle_timeout' on HttpConnectionManager, disabled by defaultstreamIdleTimeout: 5m# 'max_stream_duration' on Cluster, disabled by defaultmaxStreamDuration: 30m
We will apply the configuration with kubectl apply -f [..].
type: Timeoutmesh: defaultname: timeouts-backendsources:- match:kuma.io/service: '*'destinations:- match:kuma.io/service: 'backend'conf:# connectTimeout defines time to establish connection, 'connect_timeout' on Cluster, default 10sconnectTimeout: 10stcp:# 'idle_timeout' on TCPProxy, disabled by defaultidleTimeout: 1hhttp:# 'timeout' on Route, disabled by defaultrequestTimeout: 5s# 'idle_timeout' on Cluster, disabled by defaultidleTimeout: 1hgrpc:# 'stream_idle_timeout' on HttpConnectionManager, disabled by defaultstreamIdleTimeout: 5m# 'max_stream_duration' on Cluster, disabled by defaultmaxStreamDuration: 30m
We will apply the configuration with kumactl apply -f [..] or via the HTTP API.
Matching
Timeout is an Outbound Connection Policy. The only supported value for destinations.match is kuma.io/service.
