the same condition as a Kubernetes cluster Use any tool installed locally to test/debug/edit a service Swap a service running on a cluster for a local service
cluster $ kubectl get no NAME STATUS ROLES AGE VERSION aks-default-09796230-0 Ready agent 43h v1.13.12 aks-default-09796230-1 Ready agent 43h v1.13.12 # Start a shell that proxies connections to Kubernetes # Needs to enter the sudo password $ telepresence
cd telepresence $ echo "hello from your laptop" > file.txt $ ls file.txt # Test locally $ python3 -m http.server 8001 & [1] 47404 $ curl http://localhost:8001/file.txt hello from your laptop $ kill %1
hello-world --expose 8000 \ --run python3 -m http.server 8000 & # A pod is swapped $ kubectl get po | grep hello-world hello-world-7c2fc81aaad6400bae6c760f74be47cb-59db7d4c9b-7ll2r 1/1 Running 0 5m28s # Send a query to a service $ curl $HELLOWORLD/file.txt hello from your laptop or display in web browser
sudo docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e9fc5e0f7ddc hello-dev "python3 ./server.py" 8 minutes ago Up 8 minutes telepresence-1573198861-6937146-39240 1851864adb52 datawire/telepresence-local:0.103 "/sbin/tini -v -- py…" 8 minutes ago Up 8 minutes 127.0.0.1:41695->38022/tcp telepresence-1573198854-7027166-39240