<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PodDisruptor on Grafana Labs</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/</link><description>Recent content in PodDisruptor on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/index.xml" rel="self" type="application/rss+xml"/><item><title>Constructor</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/constructor/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/constructor/</guid><content><![CDATA[&lt;h1 id=&#34;constructor&#34;&gt;Constructor&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;PodDisruptor()&lt;/code&gt; constructor creates a new instance of a 
    &lt;a href=&#34;/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/&#34;&gt;PodDisruptor&lt;/a&gt; class.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Parameter&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;selector&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#selector&#34;&gt;criteria&lt;/a&gt; for selecting the target pods&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;options (optional)&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#options&#34;&gt;options&lt;/a&gt; for controlling the behavior of the disruptor&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;selector&#34;&gt;Selector&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;selector&lt;/code&gt; defines the criteria a pod must satisfy to be a valid target:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Attribute&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;namespace&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;namespace the selector will look for pods&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;select&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#pod-attributes&#34;&gt;attributes&lt;/a&gt; that a pod must match to be selected&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;exclude&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#pod-attributes&#34;&gt;attributes&lt;/a&gt; that exclude a pod (even if it matches the select attributes)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can use the following attributes to select or exclude pods:&lt;/p&gt;
&lt;h3 id=&#34;pod-attributes&#34;&gt;Pod attributes&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Attribute&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;labels&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;map with the labels to be matched for selection or exclusion&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;options&#34;&gt;Options&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;options&lt;/code&gt; control the creation and behavior of the &lt;code&gt;PodDisruptor&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Attribute&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;injectTimeout&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;maximum time to wait for the disruptor to be ready in the target pods (default 30s)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;!-- eslint-skip --&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;const selector = {
  namespace: &amp;#39;my-namespace&amp;#39;,
  select: {
    labels: {
      app: &amp;#39;my-app&amp;#39;,
    },
  },
};
const podDisruptor = new PodDisruptor(selector);&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="constructor">Constructor&lt;/h1>
&lt;p>The &lt;code>PodDisruptor()&lt;/code> constructor creates a new instance of a
&lt;a href="/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/">PodDisruptor&lt;/a> class.&lt;/p>
&lt;section class="expand-table-wrapper">&lt;div class="button-div">
&lt;button class="expand-table-btn">Expand table&lt;/button>
&lt;/div>&lt;div class="responsive-table-wrapper">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>selector&lt;/td>
&lt;td>object&lt;/td>
&lt;td>&lt;a href="#selector">criteria&lt;/a> for selecting the target pods&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>options (optional)&lt;/td>
&lt;td>object&lt;/td>
&lt;td>&lt;a href="#options">options&lt;/a> for controlling the behavior of the disruptor&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/section>&lt;h3 id="selector">Selector&lt;/h3>
&lt;p>The &lt;code>selector&lt;/code> defines the criteria a pod must satisfy to be a valid target:&lt;/p></description></item><item><title>injectGrpcFaults()</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/injectgrpcfaults/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/injectgrpcfaults/</guid><content><![CDATA[&lt;h1 id=&#34;injectgrpcfaults&#34;&gt;injectGrpcFaults()&lt;/h1&gt;
&lt;p&gt;injectGrpcFaults injects gRPC faults in the requests served by a target Pod.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Parameter&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;fault&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;description of the 
    &lt;a href=&#34;/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/faults/grpc/&#34;&gt;gRPC faults&lt;/a&gt; to be injected&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;duration&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;duration of the disruption&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;options (optional)&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#options&#34;&gt;options&lt;/a&gt; that control the injection of the fault&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;options&#34;&gt;options&lt;/h2&gt;
&lt;p&gt;The injection of the fault is controlled by the following options:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Option&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;proxyPort&lt;/td&gt;
              &lt;td&gt;number&lt;/td&gt;
              &lt;td&gt;port the agent will use to listen for requests in the target pods ( default &lt;code&gt;8000&lt;/code&gt;)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;!-- eslint-skip --&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;const fault = {
  averageDelay: &amp;#39;50ms&amp;#39;,
  statusCode: 13,
  errorRate: 0.1,
};
disruptor.injectGrpcFaults(fault, &amp;#39;30s&amp;#39;);&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="injectgrpcfaults">injectGrpcFaults()&lt;/h1>
&lt;p>injectGrpcFaults injects gRPC faults in the requests served by a target Pod.&lt;/p>
&lt;section class="expand-table-wrapper">&lt;div class="button-div">
&lt;button class="expand-table-btn">Expand table&lt;/button>
&lt;/div>&lt;div class="responsive-table-wrapper">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>fault&lt;/td>
&lt;td>object&lt;/td>
&lt;td>description of the
&lt;a href="/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/faults/grpc/">gRPC faults&lt;/a> to be injected&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>duration&lt;/td>
&lt;td>string&lt;/td>
&lt;td>duration of the disruption&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>options (optional)&lt;/td>
&lt;td>object&lt;/td>
&lt;td>&lt;a href="#options">options&lt;/a> that control the injection of the fault&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/section>&lt;h2 id="options">options&lt;/h2>
&lt;p>The injection of the fault is controlled by the following options:&lt;/p></description></item><item><title>injectHTTPFaults()</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/injecthttpfaults/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/injecthttpfaults/</guid><content><![CDATA[&lt;h1 id=&#34;injecthttpfaults&#34;&gt;injectHTTPFaults()&lt;/h1&gt;
&lt;p&gt;injectHTTPFaults injects HTTP faults in the requests served by a target Pod.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Parameter&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;fault&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;description of the 
    &lt;a href=&#34;/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/faults/http/&#34;&gt;http faults&lt;/a&gt; to be injected&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;duration&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;duration of the disruption&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;options (optional)&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#options&#34;&gt;options&lt;/a&gt; that control the injection of the fault&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;options&#34;&gt;options&lt;/h2&gt;
&lt;p&gt;The injection of the fault is controlled by the following options:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Option&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;proxyPort&lt;/td&gt;
              &lt;td&gt;number&lt;/td&gt;
              &lt;td&gt;port the agent will use to listen for requests in the target pods ( default &lt;code&gt;8000&lt;/code&gt;)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;

&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;When injecting faults you may find the following error message during the test execution:&lt;/p&gt;
&lt;p&gt;WARN[0035] Request Failed error=&amp;ldquo;read tcp 172.18.0.1:43564-&amp;gt;172.18.255.200:80: read: connection reset by peer&amp;rdquo;&lt;/p&gt;
&lt;p&gt;This is normal and means that one request was &amp;ldquo;in transit&amp;rdquo; at the time the faults were injected, causing the request to fail from a network connection reset.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;!-- eslint-skip --&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;const fault = {
  averageDelay: &amp;#39;50ms&amp;#39;,
  errorCode: 500,
  errorRate: 0.1,
};
disruptor.injectHTTPFaults(fault, &amp;#39;30s&amp;#39;);&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="injecthttpfaults">injectHTTPFaults()&lt;/h1>
&lt;p>injectHTTPFaults injects HTTP faults in the requests served by a target Pod.&lt;/p>
&lt;section class="expand-table-wrapper">&lt;div class="button-div">
&lt;button class="expand-table-btn">Expand table&lt;/button>
&lt;/div>&lt;div class="responsive-table-wrapper">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>fault&lt;/td>
&lt;td>object&lt;/td>
&lt;td>description of the
&lt;a href="/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/faults/http/">http faults&lt;/a> to be injected&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>duration&lt;/td>
&lt;td>string&lt;/td>
&lt;td>duration of the disruption&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>options (optional)&lt;/td>
&lt;td>object&lt;/td>
&lt;td>&lt;a href="#options">options&lt;/a> that control the injection of the fault&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/section>&lt;h2 id="options">options&lt;/h2>
&lt;p>The injection of the fault is controlled by the following options:&lt;/p></description></item><item><title>terminatePods()</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/terminate-pods/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/poddisruptor/terminate-pods/</guid><content><![CDATA[&lt;h1 id=&#34;terminatepods&#34;&gt;terminatePods()&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;terminatePods&lt;/code&gt; terminates a number of the pods matching the selector configured in the PodDisruptor.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Parameter&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;fault&lt;/td&gt;
              &lt;td&gt;object&lt;/td&gt;
              &lt;td&gt;description of the 
    &lt;a href=&#34;/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/faults/pod-termination/&#34;&gt;Pod Termination fault&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;!-- eslint-skip --&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;const fault = {
  count: 2,
};
disruptor.terminatePods(fault);&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="terminatepods">terminatePods()&lt;/h1>
&lt;p>&lt;code>terminatePods&lt;/code> terminates a number of the pods matching the selector configured in the PodDisruptor.&lt;/p>
&lt;section class="expand-table-wrapper">&lt;div class="button-div">
&lt;button class="expand-table-btn">Expand table&lt;/button>
&lt;/div>&lt;div class="responsive-table-wrapper">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>fault&lt;/td>
&lt;td>object&lt;/td>
&lt;td>description of the
&lt;a href="/docs/k6/v2.3.x/testing-guides/injecting-faults-with-xk6-disruptor/xk6-disruptor/faults/pod-termination/">Pod Termination fault&lt;/a>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/section>&lt;h2 id="example">Example&lt;/h2>
&lt;!-- eslint-skip -->
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">JavaScript&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-javascript">const fault = {
count: 2,
};
disruptor.terminatePods(fault);&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div></description></item></channel></rss>