Disrupting Network Traffic
In this lesson, you will be assigned a new homework assignment in which you have to disrupt a random network.
We'll cover the following
What can we use to disrupt random network traffic?
We were terminating random Pods, no matter which application they belong to. Can we do something similar to networking? Can we disrupt a random network or, to be more precise, a random Istio VirtualService? Yes, we can, but not by using the out-of-the-box solution in Chaos Toolkit. At the time of this writing (April 2020), the Istio plugin does not allow us to operate on a random VirtualService. So, we cannot say disrupt a random network. If we would like to do that, we would need to create our own implementation, which should be relatively straightforward. We could write the script that would, let’s say, retrieve all the VirtualServices, pick a random one, and disrupt it. Writing such a script should not be a big deal. Or, even better, we should contribute to the project by implementing such a feature in Chaos Toolkit Extension for Istio Fault Injection.
As you already know, every once in a while, I will give you tasks to do yourself, and I promised that they are not going to be trivial.
Your next task is to disrupt a random Istio VirtualService. You can do this by writing a script that, first of all, lists all the VirtualServices in a Namespace, then selects a random one, and, finally, it disrupts it in one way or another. Explore how you can modify Istio VirtualService and do some nasty things to it. If you choose to accept the challenge, once you’re done, try to implement the same in the Istio plugin. Make a pull request and contribute back to the community.
If you do not feel confident with Istio VirtualServices, you might want to check the course Canary Deployments To Kubernetes Using Istio and Friends on Udemy. The course does not speak directly about Istio, but it does show in more detail what we’re trying to do right now.
Homework Assignment
In any case, now you have a task. Create a script or contribute to the plugin. Use it inside a chaos experiment. Come back when you’re done, and we’re going to explore more stuff.
In the next lesson, we will terminate random nodes and observe the outcome.
Get hands-on with 1200+ tech skills courses.