Lifecycle Policies¶
Lifecycle policies control how Kubernetes checks the health of your service. These are timing presets for startup, readiness, and liveness probes.
What probes check¶
| Probe | When | Why |
|---|---|---|
| Startup | On container start | Waits for the service to initialize |
| Readiness | Continuously | Determines if the service is ready to accept traffic |
| Liveness | Continuously | Restarts the container if the service is stuck |
All probes use an HTTP GET request to healthPath and port from .hive.yml.
Built-in policies¶
standard (default)¶
Suitable for most services. Startup within ~60 seconds, checks every 10 seconds.
relaxed¶
For heavy services with long startup times (ML models, large .NET applications, services with DB migrations).
aggressive¶
For lightweight services that start instantly. Fast problem detection.
Timing comparison¶
Startup Probe¶
| Parameter | standard | relaxed | aggressive |
|---|---|---|---|
periodSeconds |
2 | 10 | 1 |
failureThreshold |
30 | 60 | 30 |
| Max startup time | 60s | 600s | 30s |
Readiness Probe¶
| Parameter | standard | relaxed | aggressive |
|---|---|---|---|
periodSeconds |
10 | 30 | 5 |
timeoutSeconds |
5 | 30 | 3 |
successThreshold |
1 | 1 | 1 |
failureThreshold |
3 | 5 | 1 |
Liveness Probe¶
| Parameter | standard | relaxed | aggressive |
|---|---|---|---|
periodSeconds |
10 | 30 | 5 |
timeoutSeconds |
5 | 30 | 3 |
failureThreshold |
3 | 5 | 3 |
How to choose¶
graph TD
A[Your service] --> B{Starts quickly?<br/>< 5 seconds}
B -->|Yes| C{Need fast<br/>failover?}
B -->|No| D{Takes longer than<br/>60 seconds?}
C -->|Yes| E[aggressive]
C -->|No| F[standard]
D -->|Yes| G[relaxed]
D -->|No| F
| Your case | Policy |
|---|---|
| Regular web service (Go, Node.js, Python) | standard |
| Fast stateless service | aggressive |
| .NET with long initialization | relaxed |
| ML service, loading models | relaxed |
| Service with DB migrations on startup | relaxed |
Health endpoint¶
The policy defines only timings. Path and port are service properties:
The endpoint should:
- Return HTTP 2xx (200, 204, ...)
- Respond quickly (within
timeoutSeconds) - Be lightweight (no heavy DB queries)
Simple health endpoint
No need to check all dependencies. Just return 200 OK if the service is running and can process requests.
Custom policies¶
For non-standard cases, contact the platform team — they can add a custom preset to the Helm chart.