Observability & Scaling#
Warning
This part of the Helm Chart is still influx and may change significantly. Use with caution.
This chapter covers health probes, Prometheus monitoring, and Horizontal Pod Autoscaling.
Health Probes#
The chart configures three probes by default — all enabled, all using a TCP socket check on the primary service port.
Default Probe Behavior#
| Probe | Purpose | Default Timing |
|---|---|---|
| Startup | Blocks liveness/readiness until the app is initialized | Every 5s, 30 failures allowed (up to 150s startup window) |
| Liveness | Restarts the container if unhealthy | Every 10s, 3 failures, 1s timeout |
| Readiness | Removes the pod from Service endpoints if unhealthy | Every 10s, 3 failures, 1s timeout |
All probes use tcpSocket on the primary port (whatever port is marked primary: true in service.main.ports).
Disabling Probes#
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
Custom Probes#
Replace the default TCP check with an HTTP endpoint:
probes:
liveness:
enabled: true
custom: true
spec:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
readiness:
enabled: true
custom: true
spec:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
startup:
enabled: true
custom: true
spec:
httpGet:
path: /healthz
port: 8080
periodSeconds: 5
failureThreshold: 30
Exec-Based Probe#
probes:
liveness:
enabled: true
custom: true
spec:
exec:
command:
- /bin/sh
- -c
- pg_isready -U postgres
periodSeconds: 10
failureThreshold: 3
Adjusting Default Probe Timing#
Without switching to custom: true, you can tune the timing parameters:
probes:
startup:
spec:
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 60 # 60 × 10s = 600s startup window
Prometheus ServiceMonitor#
If you're running the Prometheus Operator, the chart can create a ServiceMonitor to automatically discover your app's metrics.
Enable Monitoring#
service:
main:
ports:
http:
port: 8080
monitor:
enabled: true
endpoints:
- port: http
scheme: http
path: /metrics
interval: 1m
scrapeTimeout: 10s
Custom Metrics Port#
If your metrics are served on a separate port:
service:
main:
ports:
http:
port: 8080
primary: true
metrics:
enabled: true
port: 9090
monitor:
enabled: true
endpoints:
- port: metrics
path: /metrics
interval: 30s
Multiple Endpoints#
service:
main:
monitor:
enabled: true
endpoints:
- port: http
path: /metrics
interval: 1m
- port: http
path: /metrics/extra
interval: 5m
Monitor Labels and Annotations#
service:
main:
monitor:
enabled: true
labels:
release: prometheus
annotations:
description: "Metrics for my-app"
endpoints:
- port: http
path: /metrics
Grafana Dashboard#
Note
kloudease workload clusters use Perses, not Grafana, so this option has no effect there. Build your dashboards in Perses.
If your cluster runs Grafana with the k8s-sidecar dashboard loader enabled, the chart can create a dashboard ConfigMap so Grafana automatically discovers and provisions it — no manual import required.
Enable a Dashboard#
autoconfig:
dashboard:
enabled: true
json: |
{
"title": "my-app",
"panels": []
}
json must contain a complete Grafana dashboard definition and is required when enabled is true.
Custom Folder#
By default the dashboard is placed in Grafana's default folder. To group it under a named folder instead:
autoconfig:
dashboard:
enabled: true
folder: "my-team"
json: |
{ ... }
Dashboard Labels and Annotations#
autoconfig:
dashboard:
enabled: true
labels:
team: my-team
annotations:
description: "Dashboard for my-app"
json: |
{ ... }
Horizontal Pod Autoscaler (HPA)#
Scale your application automatically based on CPU or memory utilization.
Basic CPU-Based Scaling#
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 75
Memory-Based Scaling#
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetMemoryUtilizationPercentage: 80
Combined CPU + Memory#
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 20
targetCPUUtilizationPercentage: 70
targetMemoryUtilizationPercentage: 85
Custom Target#
By default the HPA targets the workload created by this chart. To target a different deployment:
autoscaling:
enabled: true
target: my-other-deployment
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 80
Note: When autoscaling is enabled, you should still set
application.replicas— it serves as the initial count before the HPA takes over.Important: Set
resourceson your container when using HPA. Without resource requests, percentage-based scaling targets have no baseline to calculate against.
What's Next#
Continue to Advanced for init containers, sidecars, security contexts, scheduling, and lifecycle hooks.