Skip to main content
When you intercept a Kubernetes service locally using Telepresence, any volumes mounted by the original container won’t automatically appear on your host. To ensure your local process reads from or writes to the same volume, you must explicitly mount it. This guide covers intercepting a deployment with and without volume mounts, customizing the mount point, and verifying where the volume is available on your machine.

Prerequisites

  • A running Kubernetes cluster
  • telepresence CLI installed (install guide)
  • A Deployment named products-depl that 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:
Use this when your local process doesn’t need the container’s on-disk data.

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.

3. Command Reference

4. Verifying the Volume Mount

Run the following to see active intercepts and where volumes are mounted locally:
Example output:

Further Reading

Watch Video