DEV Community

Alex Spinov
Alex Spinov

Posted on

Telepresence Has a Free API — Develop Kubernetes Services Locally

Telepresence: Your Laptop IS the Kubernetes Cluster

Telepresence connects your local development machine to a remote Kubernetes cluster. Run one service locally, everything else in the cluster. No more building Docker images for every code change.

The Problem

Developing for Kubernetes means: change code -> build image -> push -> deploy -> wait -> test -> repeat. Each cycle takes 5-10 minutes. Telepresence makes it instant.

How It Works

Telepresence creates a two-way network tunnel:

  • Your local process can access cluster services (databases, APIs)
  • Cluster traffic for your service gets routed to your laptop
  • Environment variables and volumes from the cluster are available locally

The Free CLI API

# Connect to cluster
telepresence connect

# Now access cluster services directly
curl http://api-service.default:8080/health
curl http://redis-master.default:6379

# Intercept a service (route its traffic to your laptop)
telepresence intercept my-service --port 3000:8080

# Now cluster traffic to my-service:8080 hits localhost:3000
# Run your service locally:
node server.js  # port 3000

# With environment variables from the pod
telepresence intercept my-service --port 3000 --env-file=my-service.env
source my-service.env && node server.js

# Personal intercepts (only YOUR requests)
telepresence intercept my-service --port 3000 --http-header=x-dev=alex

# List active intercepts
telepresence list

# Disconnect
telepresence quit
Enter fullscreen mode Exit fullscreen mode

Real-World Use Case

A team of 15 developers shared a staging cluster. Each dev built and deployed Docker images for every change — CI was overwhelmed. Telepresence let each dev run their service locally while connected to the cluster. Inner loop went from 10 minutes to 10 seconds.

Quick Start

# Install
brew install datawire/blackbird/telepresence

# Connect and start developing
telepresence connect
telepresence intercept my-service --port 3000
Enter fullscreen mode Exit fullscreen mode

Resources


Need automated testing data for your services? Check out my tools on Apify or email spinov001@gmail.com for custom solutions.

Top comments (0)