Change code. Build image. Push to registry. Wait for deployment. Check logs. Repeat. This cycle takes 5-15 minutes per iteration. Telepresence cuts it to seconds by routing cluster traffic to your local machine.
How It Works
Without Telepresence:
Code → Build → Push → Deploy → Test → 10 min
With Telepresence:
Code → Save → Test → 2 secTelepresence creates a two-way network connection between your laptop and the Kubernetes cluster. Your local process receives traffic as if it were running in the cluster.
Setup
# Install CLI
brew install datawire/blackbird/telepresence2
# Connect to cluster
telepresence connect
# Verify connection
telepresence status
# Connected to context: production-cluster
# Namespace: defaultYour local machine can now resolve Kubernetes DNS names:
curl http://order-api.production.svc:8080/health
# {"status": "ok"}Intercept Traffic
Route traffic from a cluster service to your local process:
# Start your local service
cd order-api
npm run dev # Running on localhost:3000
# Intercept the cluster service
telepresence intercept order-api \
--port 3000:8080 \
--namespace productionAll traffic hitting order-api:8080 in the cluster now routes to localhost:3000 on your laptop. Your local debugger, hot reload, and IDE all work.
Master this topic with hands-on labs
Go beyond reading — build real projects in sandboxed environments with expert video guidance.
Browse Courses →Personal Intercepts
In a team environment, intercept only your traffic:
telepresence intercept order-api \
--port 3000:8080 \
--http-header x-telepresence-id=aliceOnly requests with x-telepresence-id: alice route to your laptop. Other developers and production traffic are unaffected.
Environment Variables
Your local process needs the same environment as the cluster:
# Get the pod's environment
telepresence intercept order-api \
--port 3000:8080 \
--env-file order-api.env
# Source them
source order-api.env
# Or run with them
telepresence intercept order-api \
--port 3000:8080 \
-- npm run devDATABASE_URL, REDIS_URL, and every other env var from the pod is available locally.
Volume Mounts
Access mounted volumes from the pod:
telepresence intercept order-api \
--port 3000:8080 \
--mount /tmp/telepresence
# Pod's /etc/config is now at /tmp/telepresence/etc/config
ls /tmp/telepresence/var/run/secrets/kubernetes.io/serviceaccount/
# ca.crt namespace tokenConfigMaps, Secrets, and ServiceAccount tokens are available locally.
Get weekly IT automation tips
Docker, Ansible, Terraform, MLOps — curated insights delivered to your inbox. No spam.
Subscribe Free →Debugging Workflow
# 1. Connect
telepresence connect
# 2. Start local service with debugger
node --inspect order-api/src/index.js
# 3. Intercept
telepresence intercept order-api --port 3000:8080
# 4. Attach VS Code debugger to localhost:9229
# 5. Hit the service from the cluster
# kubectl exec -it test-pod -- curl http://order-api:8080/api/orders
# 6. Breakpoint hits in VS CodeDebug production-like traffic with your local IDE. Step through code, inspect variables, set breakpoints.
Docker Compose Integration
For services that need Docker:
telepresence intercept order-api \
--port 3000:8080 \
--docker-run -- \
--rm -v $(pwd):/app -p 3000:3000 node:20 npm run devLeave and Quit
# Stop intercepting (restore cluster routing)
telepresence leave order-api
# Disconnect from cluster
telepresence quitWhen to Use Telepresence
Good fit: - Microservices that depend on other cluster services - Debugging issues that only reproduce with real cluster data - Services with slow build-push-deploy cycles - Testing against real databases, caches, and queues
Not needed: - Standalone services with no cluster dependencies - Unit tests that mock all external services - Simple web frontends (hot reload is enough)
Team tip: Personal intercepts let multiple developers work on the same service simultaneously without conflicts.
---
Ready to go deeper? Master Kubernetes development workflows with hands-on courses at CopyPasteLearn.
Ready to learn by doing?
Stop reading tutorials — start building. Expert video courses with hands-on labs in real sandboxed environments.
Related Articles
Tilt Kubernetes Dev Environment
Tilt automates the build-push-deploy loop for Kubernetes development. Learn how Tilt watches code changes, rebuilds containers, and updates deployments.
Headlamp Kubernetes Dashboard Guide
Headlamp is a modern Kubernetes dashboard that replaces the official Kubernetes Dashboard. Learn how to install Headlamp, manage clusters, and extend it.
Kubernetes Troubleshooting Checklist
Kubernetes troubleshooting checklist. Pod failures, CrashLoopBackOff, networking issues, DNS resolution, and storage fixes.
Terraform Ansible Kubernetes Stack
Combine Terraform, Ansible, and Kubernetes for complete DevOps infrastructure. Provision, configure, and deploy end to end.
Terraform Atlantis Pull Request Automation
Atlantis automates Terraform plan and apply through pull request comments. Learn how to set up Atlantis for team-based infrastructure changes with automated.
Terraform AWS Exercises for Practice
Hands-on Terraform AWS exercises from beginner to advanced. Practice EC2, S3, VPC, RDS provisioning with real infrastructure.
Explore topics
Browse more articles on the topics covered here.