Minikube VPN access

Install Telepresence with Homebrew/apt/dnf

Transparently connecting to Minikube

In this tutorial you'll see how Telepresence allows you to get transparent access to Minikube networking from a local process outside of Minikube. This allows you to use your local tools on your laptop to communicate with processes inside Minikube.

You should start by running a service in the cluster:

$ kubectl config use-context minikube
$ kubectl run myservice --image=datawire/hello-world --port=8000 --expose
$ kubectl get service myservice
myservice    <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 shell using Telepresence that can access that service, even though the process is local but the service is running inside Minikube:

$ telepresence --run-shell
@minikube|$ curl http://myservice:8000/
Hello, world!

You also have access to the same environment variables a pod in the minikube cluster would have:

@minikube|$ env | grep MYSERVICE_

(This will not work if the hello world pod hasn't started yet... if so, try again.)

Telepresence will also allow services within minikube to access a process running your host machine.

Install Telepresence with Homebrew/apt/dnf

Still have questions? Ask in our Gitter chatroom or file an issue on GitHub.

If this tutorial was useful to you, we'd appreciate it if you'd share it online.

results matching ""

    No results matching ""