Prerequisites
- A running Kubernetes cluster
telepresenceCLI installed (install guide)- A Deployment named
products-deplthat uses a volume
1. Intercept Without Volume Mount
By default, intercepting a service only redirects traffic—you won’t have access to the original volume on your local file system:2. Intercept With Volume Mount
If your container reads or writes data to a volume, add the--mount flag. Telepresence will mount the volume into a randomly generated directory on your host:
Customizing the Local Mount Point
To choose a specific directory on your machine, pass--mount=<path>:
When you specify a mount point, ensure the directory exists and you have write permissions.
Telepresence won’t create nested directories for you.
Telepresence won’t create nested directories for you.
3. Command Reference
| Command | Description |
|---|---|
telepresence intercept products-depl --port 8000:3000 | Intercept without mounting the volume |
telepresence intercept products-depl --port 8000:3000 --mount | Mount the volume at a random local directory |
telepresence intercept products-depl --port 8000:3000 --mount=/tmp/ | Mount the volume at /tmp/ on the host |
telepresence list | List current intercepts and their mount points |
4. Verifying the Volume Mount
Run the following to see active intercepts and where volumes are mounted locally:| Field | Description |
|---|---|
| Intercept name | The identifier for this intercept |
| State | ACTIVE if currently intercepting, otherwise READY |
| Workload kind | Kubernetes resource type (e.g., Deployment, StatefulSet) |
| Destination | Local address and port where traffic is forwarded |
| Service Port Identifier | Original service port and protocol |
| Volume Mount Point | Local directory where the pod’s volume is mounted |