All Projects → grafana → xk6-chaos

grafana / xk6-chaos

Licence: Apache-2.0 license
xk6 extension for running chaos experiments with k6 💣

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to xk6-chaos

Chaos Ssm Documents
Collection of AWS SSM Documents to perform Chaos Engineering experiments
Stars: ✭ 225 (+1150%)
Mutual labels:  chaos, sre, chaos-engineering
Howtheysre
A curated collection of publicly available resources on how technology and tech-savvy organizations around the world practice Site Reliability Engineering (SRE)
Stars: ✭ 6,962 (+38577.78%)
Mutual labels:  reliability, sre, chaos-engineering
Performance-Engineers-DevOps
This repository helps performance testers and engineers who wants to dive into DevOps and SRE world.
Stars: ✭ 35 (+94.44%)
Mutual labels:  chaos, sre, chaos-engineering
aws-chaos-scripts
DEPRECATED Collection of python scripts to run failure injection on AWS infrastructure
Stars: ✭ 91 (+405.56%)
Mutual labels:  sre, chaos-engineering
Muxy
Chaos engineering tool for simulating real-world distributed system failures
Stars: ✭ 756 (+4100%)
Mutual labels:  chaos, chaos-engineering
Comcast
Simulating shitty network connections so you can build better systems.
Stars: ✭ 7,703 (+42694.44%)
Mutual labels:  chaos, chaos-engineering
Chaos Mesh
A Chaos Engineering Platform for Kubernetes.
Stars: ✭ 4,265 (+23594.44%)
Mutual labels:  chaos, chaos-engineering
Pumba
Chaos testing, network emulation, and stress testing tool for containers
Stars: ✭ 2,136 (+11766.67%)
Mutual labels:  chaos, chaos-engineering
Chaosengineeringbootcamp
A Chaos Engineering Bootcamp
Stars: ✭ 164 (+811.11%)
Mutual labels:  chaos, chaos-engineering
Kubernetes Failure Stories
Compilation of public failure/horror stories related to Kubernetes
Stars: ✭ 6,217 (+34438.89%)
Mutual labels:  reliability, sre
Awesome Sre
A curated list of Site Reliability and Production Engineering resources.
Stars: ✭ 7,687 (+42605.56%)
Mutual labels:  reliability, sre
cli
Reliably CLI - Optimise your operations
Stars: ✭ 2 (-88.89%)
Mutual labels:  sre, chaos-engineering
aws-fis-templates-cdk
Collection of AWS Fault Injection Simulator (FIS) experiment templates deploy-able via the AWS CDK
Stars: ✭ 43 (+138.89%)
Mutual labels:  sre, chaos-engineering
Kubeinvaders
Gamified Chaos Engineering Tool for Kubernetes
Stars: ✭ 673 (+3638.89%)
Mutual labels:  chaos, chaos-engineering
Chaoskube
chaoskube periodically kills random pods in your Kubernetes cluster.
Stars: ✭ 1,325 (+7261.11%)
Mutual labels:  chaos, chaos-engineering
Awesome Chaos Engineering
A curated list of Chaos Engineering resources.
Stars: ✭ 4,740 (+26233.33%)
Mutual labels:  chaos, chaos-engineering
Wheel Of Misfortune
A role-playing game for incident management training
Stars: ✭ 57 (+216.67%)
Mutual labels:  sre, chaos-engineering
awesome-chaos-engineering
Awesome chaos engineering page
Stars: ✭ 18 (+0%)
Mutual labels:  chaos, chaos-engineering
aws-lambda-chaos-injection
Chaos Injection library for AWS Lambda
Stars: ✭ 82 (+355.56%)
Mutual labels:  sre, chaos-engineering
kraken
Chaos and resiliency testing tool for Kubernetes and OpenShift
Stars: ✭ 161 (+794.44%)
Mutual labels:  reliability, chaos-engineering

⚠️ This is a proof of concept

As this is a proof of concept, it won't be supported by the k6 team. It may also break in the future as xk6 evolves. USE AT YOUR OWN RISK! Any issues with the tool should be raised here.



logo

xk6-chaos

A k6 extension for testing for the unknown unknowns. Built for k6 using xk6.

Build

To build a k6 binary with this extension, first ensure you have the prerequisites:

Then:

  1. Download xk6:
$ go install go.k6.io/xk6/cmd/xk6@latest
  1. Build the binary:
$ xk6 build --with github.com/grafana/xk6-chaos@latest

Example

import chaos from 'k6/x/chaos';
import { Pods } from 'k6/x/chaos/k8s';

export default function () {
  console.log(`Running grafana/xk6-chaos@${chaos.version}.`);
  const p = new Pods();
  console.log(
    `There are currently ${p.list().length} pods in the default namespace.`
  );
  killPod(p);
  console.log(
    `There are now ${p.list().length} pods in the default namespace.`
  );
}

function killPod(p) {
  const victim = p.list()[0];
  console.log(`Killing pod ${victim}`);
  p.killByName('default', victim);
}

Result output:

$ ./k6 run script.js

          /\      |‾‾| /‾‾/   /‾‾/   
     /\  /  \     |  |/  /   /  /    
    /  \/    \    |     (   /   ‾‾\  
   /          \   |  |\  \ |  (‾)  | 
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: test.js
     output: -

  scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):
           * default: 1 iterations for each of 1 VUs (maxDuration: 10m0s, gracefulStop: 30s)

INFO[0000] Running grafana/[email protected].             source=console
INFO[0000] There are currently 33 pods in the default namespace.  source=console
INFO[0000] Killing pod chaos-webserver-54bd848884-ds2g9           source=console
INFO[0000] There are now 32 pods in the default namespace.        source=console

running (00m00.1s), 0/1 VUs, 1 complete and 0 interrupted iterations
default ✓ [======================================] 1 VUs  00m00.1s/10m0s  1/1 iters, 1 per VU

    data_received........: 0 B 0 B/s
    data_sent............: 0 B 0 B/s
    iteration_duration...: avg=111.72ms min=111.72ms med=111.72ms max=111.72ms p(90)=111.72ms p(95)=111.72ms
    iterations...........: 1   7.513995/s
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].