IntelliJ IDEA 2023.3 Help

Remote debugging using Telepresence

Telepresence is a tool that lets you access services in a Kubernetes cluster, debug them, make and test changes as if the services were running on your computer locally.

The Kubernetes plugin provides integration with Telepresence allowing you to:

Connect to Telepresence

  1. Open the Services tool window: select View | Tool Windows | Services or press Alt+8.

  2. Right-click your Kubernetes cluster and select Connect Telepresence. Alternatively, click Telepresence icon in the toolbar. When prompted, enter your administrator account password required to start the Telepresence daemon.

    If Telepresence is not installed on your computer, a notification will appear, providing you with the option to install it. Telepresence will be installed in /usr/local/bin (on macOS and Linux) or <home>\.jetbrains (on Windows).

    Similarly, if Traffic Manager is not installed in the cluster, IntelliJ IDEA will prompt you to install it.

    Install Traffic Manager
  3. After installing Telepresence and Traffic Manager, click Connect Telepresence again.

You can now access services in the Kubernetes cluster by their DNS names as if the cluster were running on your workstation. For example, if you have an application that accepts requests to hello-node:9001, you can access it by its name.

Telepresence Connect

Intercept traffic from cluster

Intercepts allow you to take traffic going to a service in the Kubernetes cluster and route it to the local service.

  1. On the toolbar, click Telepresence icon (Create New Interception) and then click Create new interception.

  2. In the window that opens, in the Service list, select a workload to intercept. This can be a Deployment, a ReplicaSet, or a StatefulSet.

    In the Ports field, specify the port, on which the local instance of your service is running.

    Telepresence Intercept

If the service is intercepted successfully, you can access it locally and use the IDE features to try, debug, and profile your application running in the cluster.

Quit Telepresence

Telepresence interacts with one cluster at a time, so you may need to stop it before connecting to another cluster. Quitting Telepresence will stop all active intercepts.

  1. Open the Services tool window: select View | Tool Windows | Services or press Alt+8.

  2. Right-click your Kubernetes cluster and select Quit Telepresence. Alternatively, click Quit Telepresence icon in the toolbar.

Last modified: 22 February 2024