Skip to content
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

K8s support #213

Open
marqub opened this issue May 9, 2018 · 11 comments
Open

K8s support #213

marqub opened this issue May 9, 2018 · 11 comments

Comments

@marqub
Copy link

marqub commented May 9, 2018

Hi,
I worked on using ToxyProxy with k8s.
Basically it involves

  • deploying ToxyProxy in k8s
  • opening ports dynamically in k8s

Would you be interested by a PR?

@jpittis
Copy link
Contributor

jpittis commented May 9, 2018

Hey! Thanks for opening an issue. 😄

If you're referring to using Toxiproxy in production to serve production traffic, I'm of the opinion that we should not be encouraging this because Toxiproxy has not been designed to handle production traffic.

If you're using Toxiproxy with k8s in some kind of a test or staging environment, I'd love to understand more about what you're doing and the changes you're proposing.

@marqub
Copy link
Author

marqub commented May 9, 2018

yes second one: we have one single deployment model, which is based on k8s.
We deploy systematically our microservices with k8s. The deployments can be QA deployment (run basic e2e tests) or perf env (perf test) or pre-prod/prod env.
We don't want to have different deployment models and we can catch any integration issue asap.
We plan also to run our resiliency tests against a k8s deployment. It means that we deploy toxyproxy in the k8s cluster to.
The tests are run outside the cluster.

So I just modified toxyproxy (proxy.go) so that when a new proxy is created (REST POST), the port is also opened inside k8s (k8s service).

Additionally, I also came up with an helm chart to deploy toxyproxy in k8s.
Does it make sense?

I'm still putting all the pieces together so nothing ready yet.

@jpittis
Copy link
Contributor

jpittis commented May 9, 2018

For me the trouble with using Toxiproxy in k8s is that it may not be the best tool for the job. For example, you'll have access to manipulate the nodes iptables and traffic control rules instead of using Toxiproxy.

I'm not convinced we'd be willing to accept changes like this upstream, unless of course there are some minor general purpose refactors that make your life a lot easier without being a negative or anyone else using the project.

I am however very interested in what you're doing. Once you've finished, writing up a small article / blog post showing off what you did would be amazing.

@marqub
Copy link
Author

marqub commented May 9, 2018 via email

@marqub
Copy link
Author

marqub commented May 21, 2018

Jake,
I put together something to demonstrate how we can use toxiproxy with k8s... Would you be available for a quick review. It would be the easiest way to understand if it's something that would make sense as a contribution...

cheers
Bruno

@rmohta
Copy link

rmohta commented Aug 27, 2018

@marqub would you be interested in sharing the documentation?

@marqub
Copy link
Author

marqub commented Sep 12, 2018

@marqub would you be interested in sharing the documentation?

I didn't write down anything. I planned to write a short blog post and create a git repository but didn't take the time to do it.
I can walk you through what I have and if you are interested we can discuss about the next steps. At least it will get me started.

@caalberts
Copy link

@marqub i'm also interested in how you manage opening the port in the k8s service. I have just started using toxiproxy, and what I have done is create a deployment, then manually create a service with a list of the proxy ports.

A helm chart would be great too!

@marqub
Copy link
Author

marqub commented Dec 18, 2018

@caalberts @rmohta
Here a story on Medium that details how we use ToxiProxy on K8s
http://bit.ly/2EAXRYk

Hope it helps!

@caalberts
Copy link

Looks great. Will give it a try

@gdubicki
Copy link

As of 2024, there's a reasonable Helm chart for toxiproxy available here: https://artifacthub.io/packages/helm/deliveryhero/toxiproxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants