livenessProbe-readinessProbe-httGet案例
cat 26-pods-livenessProbe-readinessProbe-httGet.yaml
kind: Pod
apiVersion: v1
metadata:
name: probe-liveness-readiness-httpget
labels:
school: baimei
class: dashu
spec:
containers:
- name: web
image: harbor.baimei.com/baimei-web/nginx:1.25.1-alpine
livenessProbe:
httpGet:
port: 80
path: /index.html
failureThreshold: 3
initialDelaySeconds: 0
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
httpGet:
port: 80
path: /baimei.html
failureThreshold: 3
initialDelaySeconds: 20
periodSeconds: 1
successThreshold: 1
timeoutSeconds: 1
---
apiVersion: v1
kind: Service
metadata:
name: probe-readiness-liveness-httpget
spec:
type: ClusterIP
selector:
class: dashu
ports:
- port: 8888
targetPort: 80
欢迎来撩 : 汇总all