Table of Contents
- 1. Run Telepresence in Docker
- 2. Intercepting the Auth Service
- 3. Intercepting the Products Service
- 4. Hot-Reload with Bind Mounts
- 5. Automatic Image Build with
--docker-build - 6. References
1. Run Telepresence in Docker
First, ensure any existing Telepresence session is terminated, then start a new session with the daemon running inside a Docker container.Make sure your Kubernetes context and namespace are correctly configured before running
telepresence connect --docker.Verify Telepresence Status
Confirm the Daemon Container
2. Intercepting the Auth Service
2.1 Inspect Cluster Services
2.2 Update Local Auth Service
In yourauth/index.js:
2.3 Build the Auth Docker Image
2.4 Create the Telepresence Intercept
2.5 Verify the Auth Container
3. Intercepting the Products Service
3.1 Modify the Products Endpoint
Editproducts/index.js to confirm local behavior:
3.2 Build and Intercept
3.3 Test the Products Intercept
4. Hot-Reload with Bind Mounts
Rebuilding images after each change can slow development. Instead, use a bind mount with Nodemon for hot-reload.4.1 Dockerfile for Hot-Reload
4.2 Update package.json
4.3 Run with Bind Mount and Nodemon
products directory now triggers an auto-reload inside the container.
5. Automatic Image Build with --docker-build
Skip manual builds by letting Telepresence build your image during intercept:
- Builds the image from the
products/directory - Tags it as
my-debug-image - Starts the intercept in one step