
上QQ阅读APP看书,第一时间看更新
TCP checks
Kubernetes also supports health checks via simple TCP socket checks and also with custom command-line scripts.
The following snippets are examples of what both use cases look like in the YAML file.
Health check using command-line script:
livenessProbe:
exec:
command:
-/usr/bin/health/checkHttpServce.sh
initialDelaySeconds:90
timeoutSeconds: 1
Health check using simple TCP Socket connection:
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 15
timeoutSeconds: 1