Telepresence

Telepresence

Jan 20, 2021

What is it?

Allows you to run a service on your local machine while also connecting other services on the remote Kubernetes cluster.

Why is it?

It is difficult to test and debug a service in a complex microservice architected applications from you local machine.

For a developer with a machine 16 Gigs of RAM, it is difficult to spin up docker compose or minikube to run all the applications on a local machine. You might just end up heating 🔥 the system.

Often, to complete feature testing we need good amount of traffic hence we deploy the application on a cluster environment with good amount of traffic, named as staging cluster.

From the time you commit the code to it be available on the cluster, it goes through below phases :

1) Compile - to compile and run all the test cases it takes on an average 1-2 mins

2) Build - to build the image it takes on an average 1 min

3) Push - to delete the existing pod and create a new pod with fresh code takes on an average 2-3 mins

So by the time the code it available on cluster, the developer slips a good 4-6 mins on every change made to the code which is to be tested on cluster.

How does it?

Fundamentally, It replaces your pod running in the cluster with a two way network proxy. Essentially swapping out the pod in the cluster with your local development.

Any traffic routed to the service will now be proxied from the kubernetes cluster to the local machine.

Which means your machine is now part of the cluster and is serving the live traffic from the cluster environment.

Telepresence proxies the environment variables and volumes and TCP connections to your machine. It intercepts DNS so DNS calls and TCP traffic are routed to the cluster through the proxy from your local machine.

Advantage?

Saves individual developer time by quick allowing them to testing their changes with the cluster services.

Helps the developers to locally test/debug and change the service.

It allows to make your local deployment be part of the cluster easily.

Installing telepresence

To verify you can simply open the terminal and run the telepresence command :

And btw ... its not a penguin ... its a bird. 😉

link for reference -> https://www.telepresence.io

Enjoy this post?

Buy Shanker a coffee

More from Shanker