K8s livenessProbe

(LivenessProbe에서 넘어옴)

1 개요[ | ]

k8s livenessProbe
yaml
Copy
apiVersion: v1
kind: Pod
metadata:
  labels:
    test: liveness
  name: liveness-exec
spec:
  containers:
  - name: liveness
    image: k8s.gcr.io/busybox
    args:
    - /bin/sh
    - -c
    - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
    livenessProbe:
      exec:
        command:
        - cat
        - /tmp/healthy
      initialDelaySeconds: 5
      periodSeconds: 5
yaml
Copy
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
    httpHeaders:
    - name: Custom-Header
      value: Awesome
  initialDelaySeconds: 3
  periodSeconds: 3
yaml
Copy
livenessProbe:
  tcpSocket:
    port: 8080
  initialDelaySeconds: 15
  periodSeconds: 20
yaml
Copy
livenessProbe:
  httpGet:
    path: /healthz
    port: liveness-port
yaml
Copy
livenessProbe:
  httpGet:
    path: /healthz
    port: liveness-port
  failureThreshold: 1
  periodSeconds: 10
yaml
Copy
livenessProbe:
  httpGet:
    httpHeaders:
      - name: Accept
        value: application/json
yaml
Copy
livenessProbe:
  httpGet:
    httpHeaders:
      - name: Accept
        value: ""

2 같이 보기[ | ]

3 참고[ | ]