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
OS X
brew cask install osxfuse
brew install datawire/blackbird/telepresence
Ubuntu 16.04 or later
curl -s https://packagecloud.io/install/repositories/datawireio/telepresence/script.deb.sh | sudo bash
sudo apt install --no-install-recommends telepresence
Windows
Install Windows Subsystem for Linux
Start the BASH.exe program
Install Telepresence by following the Ubuntu instructions above
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
Thank you folks. Please do check my other articles on https://softwareengineeringcrunch.blogspot.com
If you like my article, you can support me by buying me a coffee ->
Top comments (0)