chaostoolkit / chaostoolkit-kubernetes

Kubernetes driver extension of the Chaos Toolkit probes and actions API
https://chaostoolkit.org/drivers/kubernetes/
Apache License 2.0
189 stars 79 forks source link

404 error on chaosk8s action [kill, remove, scale] #62

Open r1sharma opened 4 years ago

r1sharma commented 4 years ago

I am seeing issues when I am trying to run experiment on micro service hosted on minikube . I see this behavior for actions which accepts name as mandatory parameter in the request:

Here is the link to my GitHub repository which host the code for sample spring boot micro service that I am deploying on local minikube and trying to run chaos experiments. All the probes are successful . Only experiments are failing.

Error when running chaos:

Screen Shot 2019-12-02 at 12 52 59 PM

kubect service description:

Screen Shot 2019-12-02 at 12 53 32 PM

r1sharma commented 4 years ago

Looked a little more in the code and figured that toolkit is currently looking for apis in kube cluster with version apps/v1beta1 as per code here. Latest version of kubectl accepts only apps/v1 version for the apis. Is there a recommended version of kubectl in the docs that I should use? Also can we update this to point it to the latest?

Lawouach commented 4 years ago

Hello.

I think this may have been fixed in https://github.com/chaostoolkit/chaostoolkit-kubernetes/pull/53 but unreleased yet. I'm happy to do a new release if you could just double check it works with master on your side?

As for the API version, it's a very good call but could this be a different issue as it's a general question :)

r1sharma commented 4 years ago

Sure @Lawouach . Can you please point me to the instructions on how I can test it from the master branch? Also as you mentioned, I will go ahead and create another issue for api version.

Lawouach commented 4 years ago

Hi @r1sharma, I apologise for not responding earlier.

If you have enough controls over your deployment environment:

1/ pip install pip install git+https://github.com/chaostoolkit/chaostoolkit-kubernetes.git

or

2/ git clone https://github.com/chaostoolkit/chaostoolkit-kubernetes.git cd chaostoolkit-kubernetes pip install -e .

r1sharma commented 4 years ago

@Lawouach thanks for your response. My changes didn't worked when I took the master branch changes on my local. I had to upgrade the code locally in order to look for Kubernetes API version apps/v1 and later it worked great. I do have changes ready. Will create a PR shortly. Meanwhile opening a separate issue for api version that we discussed earlier.