Bridge to Kubernetes

Bridge to Kubernetes redirects traffic between your connected Kubernetes cluster and your development computer. Local code and services in your Kubernetes cluster can communicate as if they’re in the same Kubernetes cluster.

Why?

Need an easy way to connect a local running service to a Kubernetes cluster for ease of testing.

Alternatives

  • DevSpace
  • Tilt
  • Skaffold
  • Telepresence

Prerequisites

  • Visual Studio Code extension Bridge to Kubernetes

How

CMD + SHIFT + P -> Bridge to Kubernetes: Configure -> Choose a service...

CMD + SHIFT + P -> Bridge to Kubernetes: Open -> Connect to the cluster

Now all requests to the selected service will be redirected to your local machine.

CMD + SHIFT + P -> Bridge to Kubernetes: Open -> Disconnect current session

Configuration is saved in ./vscode/tasks.json in your project.

/etc/hosts is updated with all services running in the same namespace.

K8s