DocsTelepresenceCreate an intercept
Create an intercept
With the Telepresence for Docker extension, you can create intercepts from one of your Kubernetes clusters, directly in the extension, or you can upload an intercept specification to run more complex intercepts. These intercepts route the cluster traffic through a proxy URL to your local Docker container. Follow the instructions below to create an intercept with Docker Desktop.
Before you begin, you need:
- Docker Desktop.
- The Telepresence extension installed.
- kubectl, the Kubernetes command-line tool.
Connect to Ambassador Cloud through the Telepresence Docker extension.
Click the Telepresence extension in Docker Desktop, then click Get Started.
You'll be redirected to Ambassador Cloud for login, you can authenticate with Docker, Google, GitHub or GitLab account.
Create an Intercept from a Kubernetes service
Select the Kuberentes context you would like to connect to.
Once your Telepresence is connected to your cluster you will see a list of services you can connect to. If you don't see the service you want to intercept, you may need to change namespaces in the dropdown menu.
Click the Intercept button on the service you want to intercept. You will see a popup to help configure your intercept, and intercept handlers.
Telepresence will start your intercept on your service, and your local container on the designated port. You will then be redirected to a management page where you can view your active intercepts.
Create an Intercept from an Intercept Specification.
Click the dropdown on the Connect button to activate the option to upload an intercept specification.
Click Upload Telepresence Spec to run your intercept specification.
Once your specification has been uploaded, the extension will process it and redirect you to the running intercepts page once it has been started.
The intercept information now shows up in the Docker Telepresence extension. You can now test your code.
Test your code
Now you can make your code changes in your preferred IDE. When you're finished, build a new container with your code changes and restart your intercept.
view next to your preview URL to open a browser tab and see the changes you've made in realtime, or you can share the preview URL with teammates so they can review your work.