apiVersion: apps/v1
kind: Deployment
spec:
replicas: 1
template:
spec:
containers:
- name: testLivenessProbe
livenessProbe: #容器健康检查(可选参数)
httpGet:
path: /healthz
port: 80 #与容器端口保持一致
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 2
periodSeconds: 10
failureThreshold: 3 #最少连续探测失败多少次才被认定为失败
readinessProbe: #容器启动检查(可选参数)
httpGet:
path: /healthz
port: 80 #与容器端口保持一致
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 2
periodSeconds: 10
failureThreshold: 3 #最少连续探测失败多少次才被认定为失败`在这里插入代码片`
k8s监控检查、存活检查
最新推荐文章于 2023-09-06 15:43:04 发布