Code and debug an application locally
Local Development Methods
Telepresence offers three powerful ways to develop your services locally:
Replace
- How it Works:
- Replaces an existing container within your Kubernetes cluster with a Traffic Agent.
- Reroutes traffic intended for the replaced container to your local workstation.
- Makes the remote environment of the replaced container available to the local workstation.
- Provides read-write access to the volumes mounted by replaced container.
- Impact:
- A Traffic Agent is injected into the pods of the targeted workload.
- The replaced container is removed from the pods of the targeted workload.
- The replaced container is restored when the replace operation ends.
- Use-cases:
- You're working with message queue consumers and must stop the remote container.
- You're working with remote containers configured without incoming traffic.
Intercept
- How it Works:
- Intercepts requests destined for a specific service port (or ports) and reroutes them to the local workstation.
- Makes the remote environment of the targeted container available to the local workstation.
- Provides read-write access to the volumes mounted by the targeted container.
- Impact:
- A Traffic Agent is injected into the pods of the targeted workload.
- Intercepted traffic is rerouted to the local workstation and will no longer reach the remote service.
- All containers keep on running.
- Use-cases:
- Your main focus is the service API rather than the cluster's pods and containers.
- You want your local service to only receive specific ingress traffic, while other traffic must be untouched.
- You want your remote container to continue processing other requests or background tasks.
Ingest
- How it Works:
- Makes the remote environment of the ingested container available to the local workstation.
- Provides read-only access to the volumes mounted by replaced container.
- Impact:
- A Traffic Agent is injected into the pods of the targeted workload.
- No traffic is rerouted and all containers keep on running.
- Use-cases:
- You want to keep the impact of your local development to a minimum.
- You have don't need traffic being routed from the cluster, and read-only access to the container's volumes is ok.