Objective: Learn how to bridge HPC (SLURM) and Kubernetes (k3s) using Interlink.
This repository contains step-by-step instructions to deploy a complete Interlink setup bridging two systems:
- Machine 122 (SLURM): 192.168.2.122 - HPC backend with SLURM + Interlink
- Machine 78 (k3s): 192.168.2.78 - Kubernetes cluster with VirtualKubelet
Kubernetes pods scheduled to the virtual node will be automatically offloaded to SLURM jobs on the HPC backend.
hpc-course/
├── README.md # This file (start here)
├── docs/
│ ├── PHASES/ # Phase-by-phase learning path
│ │ ├── phase1-slurm-setup.md # Detailed SLURM installation
│ │ ├── phase2-k3s-setup.md # Detailed k3s installation
│ │ ├── phase3-interlink-setup.md # Detailed Interlink setup
│ │ └── phase4-test-offload.md # Detailed testing procedures
k3s (Machine 2) Interlink Bridge SLURM (Machine 1)
─────────────────── ──────────────── ──────────────────
Pod submitted
│
▼
Virtual Node "interlink-node"
│ (watches for pods)
│
├─► VirtualKubelet Pod (Helm)
│ │
│ │ REST/HTTP
│ │
│ └──────────────────────────────► Interlink API (port 3000)
│ │
│ │ REST/HTTP
│ │
│ ▼
│ SLURM Plugin
│ │
│ │ sbatch/squeue
│ │
│ ▼
│ SLURM Daemon
│ │
│ ◄──────────────────────────────────────────┘ (status)
│
Pod completes on SLURM backend
| Component | Machine | Type | Port | Role |
|---|---|---|---|---|
| VirtualKubelet | 2 | Helm Pod | - | Watches k8s pods, translates to Interlink |
| Interlink API | 1 | Binary | 3000 | Translates pods to SLURM jobs |
| SLURM Plugin | 1 | Binary | 4000 | Submits jobs to SLURM |
| SLURM | 1 | Service | - | Schedules and executes jobs |
| k3s | 2 | Service | 6443 | Kubernetes control plane |
- Connectivity: Machine 78 must reach Machine 122 on port 3000 (Interlink API)
- SSH Keys: Key-based SSH between machines (for remote commands)
- Subnet: 192.168.2.0/24
Test connectivity before starting:
ping 192.168.2.122 # From Machine 78
ping 192.168.2.78 # From Machine 122
curl http://192.168.2.122:3000/ # From Machine 78 (after setup)Current Status: ✅ All connectivity verified
- Submit pod to k3s pointing to
interlink-node - Pod status changes to Running
- VirtualKubelet detects pod, sends spec to Interlink API
- Interlink translates to SLURM job and submits via sbatch
- Job appears in SLURM queue (
squeue) - Pod status reflects job execution
- Job completes, pod marked as Completed
- Logs available via
kubectl logs
- Kubernetes node implementation that schedules pods to external systems
- Watches k3s API for pods on "interlink-node"
- Translates pod specs and submits to Interlink
- Bridge service translating Kubernetes concepts to HPC concepts
- Pod spec → SLURM job script
- Pod status → SLURM job status
- Uses REST/HTTP for communication between components
- Submits jobs to SLURM via sbatch
- Monitors job status via squeue
- Reports back to Interlink API
Machine 122 - SLURM:
ssh rocky@192.168.2.122
/home/rocky/slurm-demo/bin/sinfo
# Expected: demo partition with localhost in idle stateMachine 122 - Interlink:
ssh rocky@192.168.2.122
ps aux | grep -E 'interlink-api|slurm-plugin'
curl -I http://localhost:3000/
# Expected: HTTP/1.1 404 (API is responding)Machine 78 - VirtualKubelet:
ssh rocky@192.168.2.78
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
kubectl get pods -n virtual-kubelet
# Expected: virtual-kubelet pod in Running state- Verify
interlink-nodeexists:kubectl get nodes - Check VirtualKubelet pod:
kubectl get pods -n virtual-kubelet - Check logs:
kubectl logs -n virtual-kubelet -l app=virtual-kubelet
- Check if running:
ssh rocky@192.168.2.122 'ps aux | grep interlink-api' - Check port:
ssh rocky@192.168.2.122 'netstat -tlnp | grep 3000' - Check logs:
ssh rocky@192.168.2.122 'tail -50 ~/interlink/interlink-api.log'
# From Machine 78
ssh rocky@192.168.2.78 "ping 192.168.2.122"
ssh rocky@192.168.2.78 "curl -I http://192.168.2.122:3000/"For complete troubleshooting, see docs/FINAL-SETUP-GUIDE.md
By completing this course, you'll understand:
✓ How HPC systems (SLURM) differ from container orchestration (Kubernetes)
✓ How to implement a translation layer (Interlink) between systems
✓ How pod abstractions map to job abstractions
✓ How to debug cross-system workflows
✓ How to monitor and verify Kubernetes workloads on HPC infrastructure
✓ Real-world patterns for hybrid HPC+cloud deployments
- Interlink: https://github.com/interlink-hq/interlink
- SLURM: https://slurm.schedmd.com/
- k3s: https://docs.k3s.io/
- Kubernetes: https://kubernetes.io/docs/
- Virtual Kubelet: https://github.com/virtual-kubelet/virtual-kubelet