SentinelAura: Visual Geographic Arbitrage for Kubernetes with a 3D WebGL Dashboard
How I built a Kubernetes Operator and 3D spatial dashboard that tracks Spot Instance prices across 5 global regions and enables 1-Click compute migration with safety-first dry-run validation.
The Cost Problem No One Talks About
Cloud compute pricing is not static. Spot Instance prices fluctuate dramatically across regions — sometimes a 40% price drop in eu-west-1 while us-east-1 stays expensive. Most teams either ignore this or manually check dashboards. I wanted to automate the entire arbitrage pipeline: detect price drops → validate migration safety → execute cross-cluster migration → visualize it in 3D.
SentinelAura is a high-performance Kubernetes Operator and 3D Dashboard that makes geographic compute arbitrage visual, automated, and safe.
How It Works
SentinelAura continuously monitors Spot Instance prices across 5 global infrastructure regions. When it detects a profitable margin (factoring in data egress costs), it surfaces the opportunity on an interactive 3D globe. Operators can trigger a 1-Click Migrate — but only after the backend validates that the move is financially sound.
┌──────────────┐ Price Feed ┌──────────────┐
│ Spot Price │────────────────────▶│ Go Operator │
│ Oracle │ │ + Redis TTL │
└──────────────┘ │ Cache │
└──────┬───────┘
│ WebSocket
▼
┌──────────────┐
│ Next.js 15 │
│ 3D Globe │
│ (R3F/WebGL) │
└──────────────┘
Backend: The Go Operator
Multi-Cluster Orchestration
This isn't a mock. The Go backend maps specific Region IDs (e.g., US-East) to actual Kubernetes Contexts (ctx-us-east). It uses k8s.io/client-go with a custom RegionManager that holds multiple kubernetes.Clientset instances, enabling simultaneous cross-cluster operations.
type RegionManager struct {
clusters map[string]*ClusterClient
}
type ClusterClient struct {
clientset *kubernetes.Clientset
context string
region Region
}
When a migration is triggered, the MigrationController orchestrates the scale-down/scale-up events atomically across clusters.
Safety DryRun Logic
Here's the critical insight: migrating compute isn't free. Data egress between regions has a cost. SentinelAura includes a safety function that calculates:
(Spot Savings Over 24h) - (Egress Data Transfer Cost) = Margin
If the margin is negative, the migration is blocked with a 412 Precondition Failed error displayed instantly on the HUD. This prevents the common mistake of chasing cheap compute while hemorrhaging money on data transfer.
Redis TTL Cache
Spot prices are volatile and rate-limited by the provider. The Go Operator uses Redis as a high-speed TTL cache for fluctuating prices, preventing rate-limiting against the price oracle while ensuring sub-second lookup times.
Contextual Timeouts
Network partitions to remote clusters are a reality. Every cross-cluster operation uses context.WithTimeout to ensure network failures don't block the goroutines handling migrations:
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
err := clusterClient.AppsV1().
Deployments(namespace).
UpdateScale(ctx, name, scale, metav1.UpdateOptions{})
Frontend: The 3D Spatial Dashboard
WebGL Globe with React-Three-Fiber
The dashboard renders a Points-based 3D Earth using custom ShaderMaterial for atmospheric glow effects. It's not just decorative — the globe is the primary navigation interface.
Geographic Markers
The frontend dynamically converts latitude and longitude into 3D vector coordinates, binding interactive HTML elements precisely to their global positions on the rotating WebGL sphere:
function latLonToVector3(lat: number, lon: number, radius: number) {
const phi = (90 - lat) * (Math.PI / 180);
const theta = (lon + 180) * (Math.PI / 180);
return new Vector3(
-(radius * Math.sin(phi) * Math.cos(theta)),
radius * Math.cos(phi),
radius * Math.sin(phi) * Math.sin(theta)
);
}
Each region marker shows:
- Current spot price
- Price delta (trending up/down)
- Active deployments
- Migration eligibility status
Physics-Based Camera
framer-motion-3d powers spring-based camera transitions when regions are focused. Click a marker, and the globe smoothly rotates and zooms to center that region — with physics-based easing that feels natural.
Design System: "Memoria"
The UI implements a strict, dark-themed design system called Memoria using Tailwind v4. Vibrant, gamified neon markers provide immediate visual alerts for arbitrage opportunities — green for savings, amber for neutral, red for cost warnings.
Tech Stack
| Layer | Technology | |-------------|-----------------------------------------------| | Operator | Go 1.22+, k8s.io/client-go | | Cache | Redis (TTL-based price cache) | | Frontend | Next.js 15, React-Three-Fiber, WebGL | | Animation | framer-motion-3d, spring physics | | Styling | Tailwind v4, "Memoria" design system | | Languages | TypeScript (58%), Go (39%) |
Key Engineering Lessons
- Egress costs can eclipse savings — Always calculate net margin, not just spot price delta
- 3D visualization drives decision-making — A rotating globe with live markers makes geographic patterns instantly obvious
- Multi-cluster K8s is hard — Managing multiple
Clientsetinstances requires careful context and timeout management - Redis TTL is perfect for volatile data — Price caches with 30s TTL balance freshness against rate limits
- WebGL + React is production-ready — React-Three-Fiber makes GPU-accelerated dashboards accessible