Probes
Define startup, liveness and readiness probes for your Workload.
Refer to the probe feature for configuration details.
humanitec.score.command.yaml
(
view on GitHub
)
:
apiVersion: humanitec.org/v1b1
spec:
containers:
demo:
liveness_probe:
type: command
command:
- "bash"
- "-c"
- "/app/is_alive.sh"
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 5
readiness_probe:
type: command
command:
- "bash"
- "-c"
- "/app/is_ready.sh"
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 300
startup_probe:
type: command
command:
- "bash"
- "-c"
- "/app/is_started.sh"
failureThreshold: 200
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
humanitec.score.grpc.yaml
(
view on GitHub
)
:
apiVersion: humanitec.org/v1b1
spec:
containers:
demo:
liveness_probe:
type: grpc
port: 7001
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 5
readiness_probe:
type: grpc
port: 7001
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 300
startup_probe:
type: grpc
port: 8000
failureThreshold: 200
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
humanitec.score.http.yaml
(
view on GitHub
)
:
apiVersion: humanitec.org/v1b1
spec:
containers:
demo:
# These settings complement the livenessProbe specification in the Score file
liveness_probe:
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 5
# These settings complement the readinessProbe specification in the Score file
readiness_probe:
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 300
startup_probe:
type: "http"
path: /healthcheck
port: 8000
failureThreshold: 200
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
humanitec.score.tcp.yaml
(
view on GitHub
)
:
apiVersion: humanitec.org/v1b1
spec:
containers:
demo:
liveness_probe:
type: tcp
port: 7001
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 5
readiness_probe:
type: tcp
port: 7001
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 300
startup_probe:
type: tcp
port: 8000
failureThreshold: 200
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
score.http.yaml
(
view on GitHub
)
:
apiVersion: score.dev/v1b1
metadata:
name: my-workload
containers:
demo:
image: registry/my-image:1.0.0
livenessProbe:
httpGet:
path: "/alive"
port: 8080
readinessProbe:
httpGet:
path: "/ready"
port: 8080