One-command setup to get a dev pod on the EIDF GPU cluster (or similar Kubernetes setup) with SSH, so you can use Cursor or any IDE over Remote-SSH with a single host (eidf-dev).
Prerequisite:
You need to be able to ssh into the cluster and have you ssh-config set up accordingly. (e.g. ssh eidf_cluster should get you into the cluster)
-
Clone or download this
eidf-devfolder (e.g. from GitHub). -
Run the setup script (it syncs the folder to the cluster and prints the SSH config you need):
cd eidf-dev bash setup.shIf you get "Permission denied", run
chmod +x setup.shthen./setup.sh.When prompted, enter your SSH host alias for the cluster (e.g.
eidf_cluster).
Or pass it directly:bash setup.sh eidf_cluster -
Add the printed SSH block to your laptop’s
~/.ssh/config(the script fills in your cluster host). -
On the cluster, each time you want a dev session:
ssh YOUR_CLUSTER_HOST # e.g. ssh eidf_cluster source ~/eidf-dev/eidf-dev-up.sh
You’ll be prompted for GPUs, Memory, GPU type (if GPUs > 0), and PVC: pick an existing PVC (numbered list), create a new one (name + size), or no PVC. The script creates the job, waits for the pod, copies your SSH keys, and starts the port-forward.
-
From your laptop:
ssh eidf-devor in Cursor Remote-SSH: Connect to Host… → eidf-dev.
You land in the pod asroot. Your shell starts in/workspace/writeable(created automatically when the pod starts). The full workspace is at/workspacewhen a PVC is mounted.
- On the cluster,
$USERis set (e.g.s2838806-eidf107). All scripts useEIDF_USER="${EIDF_USER:-$USER}"so they work for any user without editing. - PVC choice: you get a numbered list of your existing PVCs, plus “Create a new PVC” (prompts for name and size, then uses it) and “No PVC”.
- Pods are found by label
eidf/user=$USER; the connect script prefers pods whose name contains$USER-dev(the ones created byeidf-dev-up.sh). - Port is 22222 by default; override with
EIDF_DEV_PORT. Queue iseidf107ns-user-queueby default; override withEIDF_QUEUE.
| Script | Where to run | Purpose |
|---|---|---|
| setup.sh | Laptop | One-time: syncs eidf-dev/ to cluster, prints SSH config |
| eidf-dev-up.sh | Cluster login node | Interactive: create dev job (GPU/RAM/PVC), wait for pod, copy keys, port-forward. If the chosen PVC doesn't exist, it will offer to create it. |
| eidf-create-pvc.sh | Cluster login node | Create a new PVC (name and size). Run standalone or when eidf-dev-up.sh prompts. Usage: bash eidf-create-pvc.sh or bash eidf-create-pvc.sh my-pvc 100Gi |
| connect-dev.sh | Cluster login node | Connect only: copy keys + port-forward to an existing dev pod |
The modules/ directory holds optional feature modules (e.g. tmux log-to-PVC) sourced by eidf-dev-up.sh; see modules/README.md.
If you want to create a PVC without running the dev pod script:
ssh YOUR_CLUSTER_HOST
bash ~/eidf-dev/eidf-create-pvc.shYou'll be prompted for the PVC name (default $USER-ws1) and storage size (e.g. 100Gi, 500Gi, 1Ti). To pass them directly: bash ~/eidf-dev/eidf-create-pvc.sh my-pvc 100Gi.
The script uses the cluster template at /opt/infk8s/templates/pvc.yml if present; otherwise it creates a generic PVC (set EIDF_PVC_STORAGE_CLASS if your cluster uses a different storage class).
If a dev pod is already running and you only need to (re)connect:
ssh YOUR_CLUSTER_HOST
source ~/eidf-dev/connect-dev.shOptional: source ~/eidf-dev/connect-dev.sh <pod-name>
Then from your laptop: ssh eidf-dev.
On the login node:
pkill -f 'port-forward.*22222:22'(Or the port in EIDF_DEV_PORT.)
- Port:
export EIDF_DEV_PORT=30222before sourcing the scripts; use the same port in yourHost eidf-devSSH config. - User:
export EIDF_USER=your-usernameif you need to override$USER. - Queue:
export EIDF_QUEUE=your-queueif your cluster uses a different Kueue queue. - Tmux logging to PVC: To log all tmux output to a file on your workspace PVC, set
LOG_TO_PVCbefore creating the pod. Every pane is logged: the first pane when you runtmux new -s X, and each new pane when you split (e.g. Ctrl+b % or "). Logs go to/workspace/writeable/data/logs/<session-name>-<timestamp>.log. Only takes effect when the pod is created (not when reconnecting).- With the script:
export LOG_TO_PVC=1then runsource ~/eidf-dev/eidf-dev-up.sh. - With the static template:
LOG_TO_PVC=1 envsubst < dev-pod.yaml | kubectl create -f -(replacedev-pod.yamlwith your edited template path). WithoutLOG_TO_PVC=1, envsubst leaves the value empty and logging is disabled.
- With the script:
- “No running dev pod found” – Run
source ~/eidf-dev/eidf-dev-up.shand wait until the pod is Running. - “Address already in use” – Another process is using the port. Stop it with the
pkillabove or setEIDF_DEV_PORTto another port and update~/.ssh/config. - Connection refused to eidf-dev – On the login node run
source ~/eidf-dev/connect-dev.shagain so the port-forward is active. - Permission denied (publickey) – Ensure you ran the connect script so your keys were copied into the pod.
- 2FA – The first hop (your cluster host) will still ask for your authenticator; after that,
eidf-devuses key-based auth. - PVC stuck in “Terminating” – Scripts ignore Terminating PVCs (they won’t appear in “Your PVCs” and selecting one by name will trigger “create it?”). To force-remove a stuck PVC (only if you’re sure nothing needs it):
kubectl patch pvc YOUR_PVC_NAME -p '{"metadata":{"finalizers":null}}' --type=merge