chaosblade-io / chaosblade-operator

chaosblade operator for kubernetes experiments
Apache License 2.0
160 stars 100 forks source link

The k8s pod-cpu injection shows success, but it does not actually take effect #208

Open yi-guo-546 opened 1 year ago

yi-guo-546 commented 1 year ago

Issue Description

Type: *The k8s pod-cpu injection shows success, but it does not actually take effect

Describe what happened (or what feature you want)

I use the command to create pod-cpu experiment: ./blade create k8s pod-cpu load --names test --kubeconfig ~/.kube/config --namespace default --timeout 60

Describe what you expected to happen

the command return 200 success, but the pod's cpu don't change

How to reproduce it (as minimally and precisely as possible)

  1. ./blade create k8s pod-cpu load --names test --kubeconfig ~/.kube/config --namespace default --timeout 60
  2. crictl stats or kubectl top pod

Tell us your environment

chaosblade: 1.7.1 chaosblade-tool: 1.7.1 k8s version: v1.23.6

Anything else we need to know?

In addition to pod cpu, memory, disk, etc. have not taken effect. In addition, the cpu/memory/disk in the container scenario does not take effect

binbin0325 commented 11 months ago

It is recommended to use container cpu load. pod cpu load uses the first container found by default. The pod cpu usage may not be observed through the pod top