Skip to main content
In this guide, you’ll discover how to run the Telepresence daemon inside a Docker container, enabling local development against your Kubernetes cluster without requiring admin privileges on your machine. By isolating the daemon’s networking stack and filesystem, Docker eliminates the need to modify host network routes or DNS, making Telepresence accessible on corporate laptops and environments with restricted permissions.
The image illustrates a "Telepresence daemon in Docker" setup, highlighting that it provides an independent networking stack and its own filesystem without requiring admin privileges on the machine.
  • Docker Engine installed and running
  • Kubernetes cluster context configured (kubectl config current-context)
  • Telepresence CLI installed (see Telepresence Docs)

1. Starting the Telepresence Daemon in Docker

Launch Telepresence with the --docker flag to spin up its daemon inside a container:
Using --docker gives the Telepresence daemon its own network namespace, avoiding any host‐level network or DNS changes.

2. Key Docker Flags

3. Intercepting a Service Normally

With the daemon running, you can intercept a Kubernetes service and route its traffic to your machine:
The image illustrates a setup for intercepting with a Docker container, showing a laptop connected via a tunnel to a Kubernetes environment with a traffic manager and a product deployment.

4. Running the Intercepted Service in Docker

Instead of running your code locally, you can launch the intercepted service inside a container:
Replace your-image-name with the Docker image you’ve built for the products service.

5. Building and Running in One Command

Skip manual builds by letting Telepresence build and run your image in a single step:
  • --docker-build products/src points to the directory with your Dockerfile or source code.
  • --docker-build-opt tag=new-image-name sets the image tag.
  • --docker-run new-image-name runs the freshly built container and establishes the intercept.
This command compiles your code into a Docker image, starts the container locally, and directs Kubernetes cluster traffic to your container.

Watch Video