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監控檢查、存活檢查
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.