Readiness and liveness probe types in Kubernetes
HTTP Test - /api/ready
readinessProbe:
httpGet:
path: /api/ready
port: 8080
TCP Test - 3306
readinessProbe:
tcpSocket:
port: 3306
Exec Command
readinessProbe:
exec:
command:
- cat
- /app/is_ready
There are additional options to consider:
- readinessProbe.initialDelaySeconds - if your application needs a time to warm-up
- readinessProbe.periodSeconds - specify how often to probe
- readinessProbe.failureThreshold - if you want to make more attempts to probe (default - 3)
Same implies to liveness probes: just replace readinessProbe with livenessProbe