Scale dev/staging environments to zero when idle. Wake them on-demand with a beautiful waiting page. Works with Deployments, StatefulSets, and CloudNativePG databases.
Install with one command:
kubectl apply -f https://github.com/athalabs/sleepyservice/releases/latest/download/install.yamlDevelopment and staging environments sit idle most of the time but keep burning resources 24/7.
SleepyService creates a smart proxy in front of your workloads that orchestrates the entire wake-up sequence.
┌─────────┐ ┌──────────────┐ ┌─────────────┐
│ User │─────▶│ Wake Proxy │─────▶│ Backend │
└─────────┘ └──────────────┘ │ (Your App) │
│ └─────────────┘
│ │
│ ┌─────────────┐
│ │ Database │
│ │ (CNPG) │
│ └─────────────┘
▼
┌──────────────┐
│ SleepyService│
│ Controller │
└──────────────┘All components (deployments, databases) are scaled to zero. No resources consumed.
Wake proxy intercepts incoming requests and triggers the wake-up sequence through the controller.
Users see a beautiful waiting page with real-time progress updates via Server-Sent Events showing which components are starting.
Controller scales components in dependency order (database first, then app), waits for health checks, then marks service as awake.
Once ready, proxy forwards traffic normally. After configured idle time, everything scales back to zero automatically.
Get started in minutes. Install the operator, create a SleepyService resource, and you're done.
Install the operator with a single command:
kubectl apply -f https://github.com/athalabs/sleepyservice/releases/latest/download/install.yamlCreate a SleepyService that manages a PostgreSQL database and a web application:
apiVersion: sleepy.atha.gr/v1alpha1
kind: SleepyService
metadata:
name: my-app
spec:
idleTimeout: 15m
components:
- name: postgres
type: CNPGCluster
ref:
name: my-db
- name: app
type: Deployment
ref:
name: my-app
replicas: 2
dependsOn:
- postgresApply it with kubectl apply -f sleepyservice.yaml
Access your app through the proxy service (my-app.default.svc.cluster.local), and it will wake up automatically when traffic arrives!
Everything you need for intelligent workload hibernation
SleepyService shines in environments with sporadic usage patterns
See how SleepyService handles different workload types
Basic example with a single Deployment. Hibernates after 30 minutes of inactivity.
apiVersion: sleepy.atha.gr/v1alpha1
kind: SleepyService
metadata:
name: demo-app
spec:
idleTimeout: 30m
components:
- name: web
type: Deployment
ref:
name: demo-web
replicas: 1Built on Kubebuilder with production-grade reliability
Standard Kubernetes deployments with replica management
Stateful workloads with ordered scaling support
CloudNativePG PostgreSQL database clusters
SleepyService uses a simple state machine with the following states:
Proven results from production deployments