diff --git a/README.md b/README.md index 5b1e990..d323e99 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,10 @@ You can take advantage of the [get_docker_params.sh](get_docker_params.sh) scrip This will take all environment variables and put them in the form "-e =" to make a long string that can get passed to the command For example: -`docker run $(./get_docker_params.sh) --net=host -v :/root/.kube/config:Z -d quay.io/redhat-chaos/krkn-hub:power-outages` +`docker run $(./get_docker_params.sh) --net=host -v :/home/krkn/.kube/config:Z -d quay.io/redhat-chaos/krkn-hub:power-outages` + +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` ### Adding New Scenarios/Testing Changes diff --git a/docs/application-outages.md b/docs/application-outages.md index 4de9395..bf5206d 100644 --- a/docs/application-outages.md +++ b/docs/application-outages.md @@ -20,6 +20,9 @@ $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` + #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: diff --git a/docs/chaos-recommender.md b/docs/chaos-recommender.md index da4bfc6..972e699 100644 --- a/docs/chaos-recommender.md +++ b/docs/chaos-recommender.md @@ -5,7 +5,8 @@ This tool profiles an application and gathers telemetry data such as CPU, Memory ``` $ podman run --name= --net=host --env-host=true -v :/home/krkn/.kube/config:Z -e NAMESPACE= -e PROMETHEUS_ENDPOINT= -e PROMETHEUS_TOKEN= quay.io/krkn-chaos/krkn-hub:chaos-recommender ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters See list of variables that apply to all scenarios [here](all_scenarios_env.md) that can be used/set in addition to these scenario specific variables diff --git a/docs/container-scenarios.md b/docs/container-scenarios.md index 004e27e..90cb001 100644 --- a/docs/container-scenarios.md +++ b/docs/container-scenarios.md @@ -19,6 +19,8 @@ $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: diff --git a/docs/network-chaos.md b/docs/network-chaos.md index f584774..9725a86 100644 --- a/docs/network-chaos.md +++ b/docs/network-chaos.md @@ -16,7 +16,8 @@ $ docker run -e = --net=host -v :/home/krk $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters diff --git a/docs/node-cpu-hog.md b/docs/node-cpu-hog.md index 20ea188..c353b41 100644 --- a/docs/node-cpu-hog.md +++ b/docs/node-cpu-hog.md @@ -19,7 +19,8 @@ $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: diff --git a/docs/node-io-hog.md b/docs/node-io-hog.md index f487dc4..1497eda 100644 --- a/docs/node-io-hog.md +++ b/docs/node-io-hog.md @@ -18,7 +18,8 @@ $ docker run -e = --net=host -v :/root/.ku $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters diff --git a/docs/node-memory-hog.md b/docs/node-memory-hog.md index 80c8df5..a48bc3b 100644 --- a/docs/node-memory-hog.md +++ b/docs/node-memory-hog.md @@ -18,7 +18,8 @@ $ docker run -e = --net=host -v :/home/krk $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: diff --git a/docs/node-scenarios.md b/docs/node-scenarios.md index e786e36..8a58e6d 100644 --- a/docs/node-scenarios.md +++ b/docs/node-scenarios.md @@ -18,7 +18,8 @@ $ docker run -e = --net=host -v :/home/krk $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: diff --git a/docs/pod-network-chaos.md b/docs/pod-network-chaos.md index 5e9025d..364fc62 100644 --- a/docs/pod-network-chaos.md +++ b/docs/pod-network-chaos.md @@ -19,7 +19,8 @@ $ docker run -e = --name= --net=host -v # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: diff --git a/docs/pod-scenarios.md b/docs/pod-scenarios.md index c7ee487..2518059 100644 --- a/docs/pod-scenarios.md +++ b/docs/pod-scenarios.md @@ -19,7 +19,8 @@ $ docker run -e = --name= --net=host -v # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: diff --git a/docs/power-outages.md b/docs/power-outages.md index d3b6f82..98979a5 100644 --- a/docs/power-outages.md +++ b/docs/power-outages.md @@ -23,7 +23,8 @@ $ docker run -e = --name= --net=host -v # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Demo Demo can be found [here](https://asciinema.org/a/r0zLbh70XK7gnc4s5v0ZzSXGo) diff --git a/docs/pvc-scenarios.md b/docs/pvc-scenarios.md index a253239..8626338 100644 --- a/docs/pvc-scenarios.md +++ b/docs/pvc-scenarios.md @@ -18,6 +18,9 @@ $ docker run -e = --name= --net=host -v # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` + +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: diff --git a/docs/service-disruption-scenarios.md b/docs/service-disruption-scenarios.md index 7fde8ca..45cd1ce 100644 --- a/docs/service-disruption-scenarios.md +++ b/docs/service-disruption-scenarios.md @@ -18,7 +18,8 @@ $ docker run -e = --net=host -v :/home/krk $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Demo See [here](https://asciinema.org/a/kKPSI0D7upV9HQWH5jnroTaKb) for a demo of this scenario diff --git a/docs/service-hijacking.md b/docs/service-hijacking.md index f5caa2f..6b34e6b 100644 --- a/docs/service-hijacking.md +++ b/docs/service-hijacking.md @@ -37,7 +37,8 @@ $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` - +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: diff --git a/docs/time-scenarios.md b/docs/time-scenarios.md index 2c9c680..817229b 100644 --- a/docs/time-scenarios.md +++ b/docs/time-scenarios.md @@ -19,6 +19,9 @@ $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` + #### Demo [Here](https://asciinema.org/a/zMBAdzHE40oPXkFVIz0exEoOX) is a demo of kraken-hub in action diff --git a/docs/zone-outages.md b/docs/zone-outages.md index b85ec65..a32fc3b 100644 --- a/docs/zone-outages.md +++ b/docs/zone-outages.md @@ -20,6 +20,8 @@ $ docker logs -f # Streams Kraken logs $ docker inspect --format "{{.State.ExitCode}}" # Outputs exit code which can considered as pass/fail for the scenario ``` +**TIP**: Because the container runs with a non-root user, ensure the kube config is globally readable before mounting it in the container. You can achieve this with the following commands: +```kubectl config view --flatten > ~/kubeconfig && chmod 444 ~/kubeconfig && docker run $(./get_docker_params.sh) --name= --net=host -v ~kubeconfig:/home/krkn/.kube/config:Z -d quay.io/krkn-chaos/krkn-hub:``` #### Supported parameters The following environment variables can be set on the host running the container to tweak the scenario/faults being injected: