New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
err: Unable to Get the chaosengine #2301
Comments
Hi @niebomin, I am wondering about this failure. It is not able to reach kube-apiserver to get the chaosengine details. Are you facing this issue every time? You can try once again if you still face this issue then you can verify by exec inside |
|
And, the thing is, as long as I disable the istio auto inject, it works. |
Interesting, the seems to be reproduced locally too. Has something to do w/ istio. Need to check this further |
Thanks. Please... |
This seems to be the cause: istio/istio#8696 There are also workarounds suggested here: istio/istio#12187 -- especially look at istio/istio#12187 (comment) (adding a label to not inject istio sidecars specifically to the chaos pods might solve this issue) The above can be achieved by adding additional labels here: https://github.com/litmuschaos/chaos-charts/blob/12ac9fb80b0b2567657b1676de1187c562f0fdf8/charts/generic/pod-delete/experiment.yaml#L77. These labels are propagated to all experiment pods and helper pods if any. However, the chaos-runner pod needs to an explicit addition of these labels here: https://github.com/litmuschaos/chaos-operator/blob/68d050966fe073377c4e818606506dd951898803/pkg/controller/chaosengine/chaosengine_controller.go#L234 |
Ok we need to add the annotation apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: nginx-chaos
namespace: default
spec:
appinfo:
appns: 'default'
applabel: 'app=nginx'
appkind: 'deployment'
annotationCheck: 'true'
engineState: 'active'
chaosServiceAccount: pod-delete-sa
monitoring: false
components:
runner:
runnerannotation:
sidecar.istio.io/inject: "false"
jobCleanUpPolicy: 'delete'
experiments:
- name: pod-delete
spec:
components:
experimentannotation:
sidecar.istio.io/inject: "false"
env:
- name: TOTAL_CHAOS_DURATION
value: '30'
- name: CHAOS_INTERVAL
value: '10'
- name: FORCE
value: 'false' |
@niebomin can you please try this and let us know? |
This great. It works around istio and works for me. Thanks! |
By the way, let me reuse this thread. What does |
@niebomin apologies on the late response. Somehow missed this Question. The chaosresult is a resource carrying details of the state & verdict of the experiment. Having said that, you can insert of lot of "custom" exit checks on the experiment via usage of the Litmus Probes. The A verdict of The latter (b)(ii) are increasingly rarer as experiments mature. We are also working on adding more static/dynamic schema validation to prevent (b)(i). So, in most cases, the app is not resilient. The chaosresults also have a field called |
@niebomin let me welcome you to the litmus slack channel - we live in the Kubernetes Slack workspace and will be happy to see you there. You might get faster responses from community folks & also participate in other interesting discussions around chaos engineering. You can use this self-service link https://slack.kubernetes.io to register & join the workspace. Once done, you can search and join the #litmus channel. |
Thanks!! I'm in the channel now. |
I have tried to disable istio inside chaosengine but its not working. I have taken reference and used above example but it's not working for me. |
Hello, sorry for commenting on this old thread, but I'm facing the exact same issue. I installed Litmus on a namespace with label |
err: Unable to Get the chaosengine
My environment is pretty simple. I have an azure k8s cluster, and followed this guide
https://istio.io/latest/docs/setup/getting-started/
to setup my environment. In other words, the namespace is enabled with istio injection.Litmus is setup, and I was trying to run pod-delete experiment. Chaos runner pod is created, but I saw errors though. "pod-delete" pod is also created, but the target pod was not deleted. When I was looking at logs by
k logs -f pod-delete-4y48y4-ql64c -c pod-delete-4y48y4
, I saw errorThis is my engine yaml, https://drive.google.com/file/d/1HAaMLamHS3BZP6SDNtD_-YO1pdl46vnh/view?usp=sharing
Litmus version is 1.9.0
The text was updated successfully, but these errors were encountered: