Telepresence for local development using Minikube

Developing locally in a microservices environment can be a bit of a pain. Assuming a Kubernetes world, Minikube helps immensely and to take it a step further Telepresence is my new friend.

What I am doing is replacing a service running inside Minikube with one running on my local host (in IntelliJ). This helps to debug and change code quickly without have to build the image and update it in Minikube.

Assuming you have 3 microservices with a flow like Request → ServiceA → ServiceB → ServiceC. I want to swap ServiceB with what I run in IntelliJ and leave the others as-is in Minikube.

Using Telepresence we can have it forward calls from ServiceA to your Local ServiceB (this post) and updating your service discovery we can have Local ServiceB talk back to ServiceC in Minikube (not covered, depends on your mechanism).

Run your local server then follow this:

It took me some trial and error to get this going so hope this help you out!