Docsright arrowTelepresenceright arrowCreate an intercept

3 min • read

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.

Prerequisites

Before you begin, you need:

Connect to Ambassador Cloud through the Telepresence Docker extension.

  1. Click the Telepresence extension in Docker Desktop, then click Get Started.

  2. You'll be redirected to Ambassador Cloud for login, you can authenticate with Docker, Google, GitHub or GitLab account.

    docker extension login

Create an Intercept from a Kubernetes service

  1. Select the Kuberentes context you would like to connect to.

    docker extension connect to cluster

  2. 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.

    docker extension start intercept page

  3. Click the Intercept button on the service you want to intercept. You will see a popup to help configure your intercept, and intercept handlers.

    docker extension start intercept popup

  4. 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.

    docker extension running intercepts page

Create an Intercept from an Intercept Specification.

  1. Click the dropdown on the Connect button to activate the option to upload an intercept specification.

    docker extension button drop down

  2. Click Upload Telepresence Spec to run your intercept specification.

    docker extension upload spec button

  3. Once your specification has been uploaded, the extension will process it and redirect you to the running intercepts page once it has been started.

  4. The intercept information now shows up in the Docker Telepresence extension. You can now test your code.

    docker extension running intercepts page

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.

Click 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.