DocsTelepresenceIntroduction
Introduction
While telepresence takes cares of the interception part of your setup, you usually still need to script some boiler plate code to run the local part (the handler) of your code.
Classic solutions rely on a Makefile, or bash scripts, but this becomes cumbersome to maintain.
Instead, you can use telepresence intercept specs: They allow you to specify all aspects of an intercept, including prerequisites, the local processes that receive the intercepted traffic, and the actual intercept. Telepresence can then run the specification.
Getting started
You will need a Kubernetes cluster, a deployment, and a service to begin using an Intercept Specification.
Once you have a Kubernetes cluster you can apply this configuration to start an echo easy deployment that we can then use for our Intercept Specifcation
You can create the local yaml file by using
And then apply it using
Spinning up a local environment with one command
First, you must create an intercept spec. The following is an example spec. It will run echo hello
before starting the intercept, then will launch thhal/echo-server:latest
as an handler for
a workload (i.e. deployment or statefulset) named echo
, at port 8080
, and finally it will
run echo goodbye
:
All you have to do is locally create this spec:
And then you can launch it: