You are browsing documentation for a version of Kuma that is not the latest release.

Looking for even older versions? Learn more.

Fault Injection

Fault Injection is an inbound policy. Dataplanes whose configuration is modified are in the destinations matcher.

FaultInjection policy helps you to test your microservices against resiliency. Kuma provides 3 different types of failures that could be imitated in your environment. These faults are Delay, Abort and ResponseBandwidth limit.


kind: FaultInjection
mesh: default
  name: fi1
    - match: frontend_default_svc_80
        version: "0.1" http
    - match: backend_default_svc_80 http
      httpStatus: 500
      percentage: 50
      percentage: 50.5
      value: 5s
      limit: 50 mbps
      percentage: 50 

Sources & Destinations

FaultInjection is a policy, which is applied to the connection between dataplanes. As most of the policies, FaultInjection supports the powerful mechanism of matching, which allows you to precisely match source and destination dataplanes.

FaultInjection policy is available only for L7 HTTP traffic, therefore is a mandatory tag for the destination selector and must be of value http, http2 or grpc.

HTTP Faults

At least one of the following Faults should be specified.


Abort defines a configuration of not delivering requests to destination service and replacing the responses from destination dataplane by predefined status code.

  • httpStatus - HTTP status code which will be returned to source side
  • percentage - percentage of requests on which abort will be injected, has to be in [0.0 - 100.0] range


Delay defines configuration of delaying a response from a destination.

  • value - the duration during which the response will be delayed
  • percentage - percentage of requests on which delay will be injected, has to be in [0.0 - 100.0] range

ResponseBandwidth limit

ResponseBandwidth defines a configuration to limit the speed of responding to the requests.

  • limit - represented by value measure in gbps, mbps, kbps or bps, e.g. 10kbps
  • percentage - percentage of requests on which response bandwidth limit will be injected, has to be in [0.0 - 100.0] range


FaultInjection is an Inbound Connection Policy. You can use all the tags in both sources and destinations sections.

Last Updated: 10/31/2022, 14:47:08 PM