Tailscale Interactive SSH (Experimental)
Connect to your workloads via Tailscale SSH for interactive development and debugging
Experimental features are new and their interface and implementation may change at any time. Expect sharp edges .
Tailscale is a mesh network VPN Service for P2P private network communication with a generous free tier and affordable starter tiers. Konduktor supports direct ssh
sessions into workloads over a tailnet which allows for interactive shells in your workload environments via a userspace networking tunnel. This let’s you connect tools like:
- SSH
- VSCode
- Jupyter Notebooks
Requirements
Tailscale ACLs
Tailscale ACLs need to be set so that the development workstation launching jobs has access to the Trainy workers which will join the Tailnet upon startup. Below is an example ACL where we create a tag tag:trainy
for our jobs and give ownership of that tag to a single user myuser@myorg.com
and group group:trainy_user
.
Create/Set Authkey
We recommend creating a ephemeral, reusable, tagged auth key. The tag for the authkey should match that of the ACL you set. In the example above, it was tag:trainy
. This will allow multiple workers and jobs to be authenticated while allowing them to be pruned from your tailnet automatically upon completion. Upon creating an auth key, you can store it as a secret to be used in your clusters via
kubectl apply -f tailscale_authkey.yaml
Afterwards, to toggle running tailscale on your jobs set the following in your ~/.konduktor/config.yaml
.
Tailscale auth keys have a maximum lifetime of 90 days. Jobs already connected to the tailnet won’t disconnect after expiry, but new jobs won’t be able to connect to the Tailnet. We recommend generating a long-lived OAuth key and using the get-authkey utility to that new auth keys can be minted easily and updated by reapplying kubectl apply -f tailscale_authkey.yaml
without having to go to the admin dashboard to remint a new auth key every 90 days. Note: we are working on authenticating via OAuth key directly so users don’t have to worry about updating their keys. If you are interested in this, please let us know!
SSH into a dev workload
For a development workload, we can define a job that idles as in the following sleep.yaml
after which we can launch with
After our workload is ACTIVE
, it should appear in our tailnet after a few seconds.