All Projects → arnaudmz → kaos

arnaudmz / kaos

Licence: Apache-2.0 license
Kinda Chaos Monkey for Kubernetes

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to kaos

Litmus
Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
Stars: ✭ 2,377 (+13105.56%)
Mutual labels:  operator, chaos-engineering, crd
Chaos Mesh
A Chaos Engineering Platform for Kubernetes.
Stars: ✭ 4,265 (+23594.44%)
Mutual labels:  operator, chaos-engineering, crd
minikube-operator
An operator for Minikube - Kubernetes on Kubernetes
Stars: ✭ 26 (+44.44%)
Mutual labels:  operator, crd
codis-operator
Codis Operator creates and manages codis clusters(proxy based Redis cluster solution) running in kubernetes.(WIP)
Stars: ✭ 21 (+16.67%)
Mutual labels:  operator, crd
chaos-operator
chaos engineering via kubernetes operator
Stars: ✭ 90 (+400%)
Mutual labels:  operator, chaos-engineering
kube-code-generator
Kubernetes code generator docker image
Stars: ✭ 60 (+233.33%)
Mutual labels:  operator, crd
bilrost
Kubernetes controller/operator to set up OAUTH2/OIDC security on any ingress based service
Stars: ✭ 17 (-5.56%)
Mutual labels:  operator
gen-crd-api-reference-docs
API Reference Docs generator for Kubernetes CRDs (used by Knative, Kubeflow and others)
Stars: ✭ 205 (+1038.89%)
Mutual labels:  crd
scheduled-scaler
No description or website provided.
Stars: ✭ 68 (+277.78%)
Mutual labels:  crd
apis
The API (CRD) of Volcano
Stars: ✭ 16 (-11.11%)
Mutual labels:  crd
xk6-chaos
xk6 extension for running chaos experiments with k6 💣
Stars: ✭ 18 (+0%)
Mutual labels:  chaos-engineering
common-disaster-recovery-scenarios
A list of common Disaster Recovery (DR) scenarios for software companies
Stars: ✭ 29 (+61.11%)
Mutual labels:  chaos-engineering
operator-manifests
Artisanally packaged Kubernetes Operators
Stars: ✭ 15 (-16.67%)
Mutual labels:  operator
configurator
Synchronize and Version Control ConfigMaps & Secrets across Deployment Rollouts.
Stars: ✭ 68 (+277.78%)
Mutual labels:  crd
loki-operator
viaq.github.io/loki-operator/
Stars: ✭ 30 (+66.67%)
Mutual labels:  operator
openshift-disconnected-operators
No description or website provided.
Stars: ✭ 52 (+188.89%)
Mutual labels:  operator
learning-unit-testing-for-k8s-operator
学习如何为 Kubernetes Operators 进行单元测试 Learning How to Write Unit Tests for Kubernetes Operators
Stars: ✭ 51 (+183.33%)
Mutual labels:  operator
namespace-provisioner
A Kubernetes operator creating K8s resources by annotating namespaces
Stars: ✭ 52 (+188.89%)
Mutual labels:  operator
oracle-database-operator
The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.
Stars: ✭ 74 (+311.11%)
Mutual labels:  operator
aws-chaos-scripts
DEPRECATED Collection of python scripts to run failure injection on AWS infrastructure
Stars: ✭ 91 (+405.56%)
Mutual labels:  chaos-engineering

Kaos: Kinda Chaos Monkey for Kubernetes

Docker Stars Docker Pulls Automated ImageLayers Size ImageLayers Layers Go Report Card

Based on the CRD Custom Resources Definition examples Kubernetes Deep Dive: Code Generation for CustomResources and Sample controller. This code is an Operator acting as a chaos generator as Netflix Simian Army. It read chaos rules and randomly deletes matching pods. Rules are defined using CRD:

apiVersion: kaos.k8s.io/v1
kind: KaosRule
metadata:
  name: my-rule
spec:
  Cron: "0 * * * * *"
  PodSelector:
    MatchLabels:
      run: nginx

Which will delete every minute a pod in the current namespace matching run=nginx selector. Cron expressions are based on robfig/cron implementation.

Getting Started

First register the custom resource definition:

kubectl apply -f manifests/kaosrule-crd.yaml

Start the Operator (with its RBAC rules)

kubectl apply -f manifests/kaos-operator-rbac.yaml
kubectl apply -f manifests/kaos-operator-serviceaccount.yaml
kubectl apply -f manifests/kaos-operator-statefulset.yaml

Then add an example of the KaosRule kind:

kubectl apply -f manifests/my-rule.yaml

Start some matching pods to see them going down:

kubectl run nginx -r=8 --image=nginx:alpine

Development

Build and run the example:

cd cmd/kaos-operator
go build
./kaos-operator -kubeconfig ~/.kube/config

Can also be launched as an in-cluster K8s deployment:

kubectl run kaos-operator --image=arnaudmz/kaos:v0.4

Watch the events describing kaos in action:

$ kubectl describe kaosrules
Name:         my-rule
Namespace:    default
Labels:       <none>
Annotations:  kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"kaos.k8s.io/v1","kind":"KaosRule","metadata":{"annotations":{},"name":"my-rule","namespace":"default"},"spec":{"Cron":"0 * * * * *","Pod..."}}
API Version:  kaos.k8s.io/v1
Kind:         KaosRule
Metadata:
  Cluster Name:
  Creation Timestamp:             2017-12-03T11:40:05Z
  Deletion Grace Period Seconds:  <nil>
  Deletion Timestamp:             <nil>
  Generation:                     0
  Initializers:                   <nil>
  Resource Version:               89920
  Self Link:                      /apis/kaos.k8s.io/v1/namespaces/default/kaosrules/my-rule
  UID:                            b4e25226-d81e-11e7-b5de-b4dde7ca9f15
Spec:
  Cron:  0 * * * * *
  Pod Selector:
    Match Labels:
      Run:  nginx
Events:
  Type     Reason             Age                From             Message
  ----     ------             ----               ----             -------
  Normal   Synced             13m                kaos-controller  Kaos Rule synced successfully and cron installed
  Warning  Pod List Empty     11m                kaos-controller  No pods matching run=nginx
  Normal   Kaos               9m                 kaos-controller  Pod nginx-5bd976694-z266d has been deleted
  Normal   Kaos               8m                 kaos-controller  Pod nginx-5bd976694-l2gmh has been deleted
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].