Version: 6.x (Current)

Debugging a single service with Telepresence

Debug Area#

In the debug area you will see the list of all the microservices developed with the Developer Console.

At the first level you have the necessary information to understand the health of the service: whether it is active or not, and the memory levels used.


Although the real potential of the debug area is its connection with telepresence. Pressing the "Debug" button will in fact display a string to be pasted on your terminal that simulates the behavior of your microservice in a real context.


This will allow you to easily test and debug your micro-service without compromising the production environments

Introduction to Telepresence#

Telepresence is an open source tool that lets you run a single service locally, while connecting that service to a remote Kubernetes cluster. This lets developers working on multi-service applications to:

  1. Do fast local development of a single service, even if that service depends on other services in your cluster. Make a change to your service, save, and you can immediately see the new service in action.

  2. Use any tool installed locally to test/debug/edit your service. For example, you can use a debugger or IDE!

  3. Make your local development machine operate as if it's part of your Kubernetes cluster. If you've got an application on your machine that you want to run against a service in the cluster -- it's easy to do.

Telepresence works on both Mac OS X and Linux, with OS-native packages.

Installing Telepresence#


On OS X you can install Telepresence by running the following:

brew cask install osxfuse
brew install datawire/blackbird/telepresence

Ubuntu 16.04 or later#

Run the following to install Telepresence:

curl -s | sudo bash
sudo apt install --no-install-recommends telepresence

If you are running another Debian-based distribution that has Python 3.5 installable as python3, you may be able to use the Ubuntu 16.04 (Xenial) packages. The following works on Linux Mint 18.2 (Sonya) and Debian 9 (Stretch) by forcing the PackageCloud installer to access Xenial packages.

curl -sO
sudo env os=ubuntu dist=xenial bash
sudo apt install --no-install-recommends telepresence

Connect to a Kubernetes Cluster and start debugging the microservice#

Let's take an example on a test cluster

1. Connect to your cluster#

gcloud container clusters get-credentials your-credential --zone your-zone --project your-project

If you don't have yet installed Google Cloud follow the steps at this link

2. Navigate in Kubernetes#

kubens demo


3a. Access to your local source directory#

cd your-local-source-directory

4a. Run telepresence and start debugging your-service-node#

telepresence --swap-deployment your-service-node --expose 3000 --run npm start


3b. Access to your local source directory#

cd your-local-source-directory

4b. Run telepresence and create env variables#

telepresence --expose 3000 --swap-deployment your-service-java --env-json your-service-java.json

5b. Install envfile intellij plugin#

At this link

6b. Configure Intellij with your service Java JSON as debug configurations#


7b. Run debug intellij#