I work on a large project using Kubernetes. We will likely be moving towards using Istio in the future, but some other people are running that process.
Although I find Istio’s features for production use very intriguing, one thing that I’m particularly interested in pertains to how it could be used on a development cluster, with close collaboration with developers.
One thing that constantly frustrates me is that I see many developers on our project have to add extensive logging statements to their services, because it’s effectively impossible to step through the code in their services when their service is in the cluster, participating in complex flows. It is completely impossible to run the entire system on a laptop, to run the entire end-to-end test.
I’ve heard of a tool called “Telepresence”, that allows configuring a cluster so that when requests are sent to particular services, they are instead redirected “out of the cluster”, to a process running on a desktop. With this, a developer could set a breakpoint in their service code and step through the code, without having to guess at what log information they need.
This isn’t practical by itself, because lots of people share the development cluster. If I made the cluster redirect requests to our service to a single process running on my desktop, I would be flooded with calls.
What I really want is for a developer to be able to set a particular known cookie in the browser to a value “registered to that user”, so that when they execute an operation in the browser page pointing to the development cluster, all the requests to a particular service, that also have that cookie value, will be redirected to the process on my desktop.
From what little I’ve read about Istio, I think this “Virtual Service” thing might facilitate this idea of mine. The Virtual Service appears to have the ability to specify different conditions for when to redirect to different routes, and it seems like some of those conditions are values in the environment. I think it’s possible that a developer could somehow “register” their cookie value into a shared resource, so that everyone else testing the app in the browser will send all requests to the services in the cluster, but the one developer with this “registered” cookie value, when a request in the pipeline goes to a particular service, it will instead go to the desktop process.
Does this seem possible? Has anyone considered doing something like this? Has it already been done?