What is Telepresence?

Initially developed by Datawire, Telepresence is a new open-source tool supported by the CNCF (Cloud Native Computing Foundation). It allows developers to run local software while connected to a remote Kubernetes  cluster. The application uses a two-way network proxy to simulate TCP connections, environmental variables, and other volumes of services as local processes. This link allows for remote work to be accomplished while seemingly local to the  cluster via the proxied connection.

This software allows developers to:

  • Improve development speed even if the local service we are working on depends on our cluster’s other remote services.
  • Utilize a local tool to test, edit, or debug a service.
  • Allow a local computer to operate as if it is part of a Kubernetes cluster.

Why Use Telepresence?

Let’s assume that we have a remote service that listens on port 8080 with a Dockerfile. This Dockerfile builds into an image called examplecom/servicename. Additionally, our service depends on other Kubernetes service instances (called thing1 and thing2) and a cloud-based database.

Our Kubernetes staging environment will look something like this:

staging1Credit to:  telepresence.io

Since we need that cloud-based database and the two additional services to test our software, we will need to accomplish the following tasks to examine a code change:

  1. Change our code locally.
  2. Build a Docker image from that change.
  3. Push the Docker image to a Docker registry located in the cloud.
  4. Update the cluster staging environment to use the new image.
  5. Wait for the image to download.

staging2

#tutorials #container #kubernetes #services #microservice

Using Telepresence to Improve Microservice Development
1.35 GEEK