In this tutorial you'll see how Telepresence allows you to get transparent access to a remote cluster from a local process.
This allows you to use your local tools on your laptop to communicate with processes inside the cluster.
You should start by running a service in the cluster:
$ kubectl run myservice --image=datawire/hello-world --port=8000 --expose $ kubectl get service myservice NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE myservice 10.0.0.12 <none> 8000/TCP 1m
It may take a minute or two for the pod running the server to be up and running, depending on how fast your cluster is.
You can now run a local process using Telepresence that can access that service, even though the process is local but the service is running in the Kubernetes cluster:
$ telepresence --run curl http://myservice:8000/ Hello, world!
(This will not work if the hello world pod hasn't started yet... if so, try again.)
What's going on:
- Telepresence creates a new
Deployment, which runs a proxy.
- Telepresence runs
curllocally in a way that proxies networking through that
- The DNS lookup and HTTP request done by
curlget routed through the proxy and transparently access the cluster... even though
curlis running locally.
curlexits the new
Deploymentwill be cleaned up.
To learn more about what Telepresence proxies you can read the relevant reference documentation.
Or check out these other tutorials
- Debugging services on Kubernetes
- Using Telepresence with Google Container Engine
- Getting started with OpenShift and Telepresence
- Telepresence and Minikube
Soft skills are as critical as technical skills for a software engineer. No one works in isolation. Each person has to deal with teammates, colleagues, managers, etc. Therefore team interpersonal skills are essential too. Soft skills include things like good communication, honesty, teamwork, integrity, organization, empathy, etc.