k8s监控检查、存活检查
apiVersion: apps/v1kind: Deploymentspec:replicas: 1template:spec:containers:- name: testLivenessProbelivenessProbe:#容器健康检查(可选参数)httpGet:...
·
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 #最少连续探测失败多少次才被认定为失败`在这里插入代码片`
更多推荐
已为社区贡献9条内容
所有评论(0)