"K8s livenessProbe"의 두 판 사이의 차이

1번째 줄: 1번째 줄:
==#==
==개요==
{{소스헤더|exec-liveness.yaml}}
;k8s livenessProbe
 
<source lang='yaml'>
<source lang='yaml'>
apiVersion: v1
apiVersion: v1
24번째 줄: 25번째 줄:
       periodSeconds: 5
       periodSeconds: 5
</source>
</source>
==#==
{{소스헤더|exec-liveness.yaml}}
<source lang='yaml'>
<source lang='yaml'>
apiVersion: v1
livenessProbe:
kind: Pod
  httpGet:
metadata:
    path: /healthz
  labels:
    port: 8080
     test: liveness
     httpHeaders:
  name: liveness-http
    - name: Custom-Header
spec:
      value: Awesome
   containers:
  initialDelaySeconds: 3
   - name: liveness
   periodSeconds: 3
     image: k8s.gcr.io/liveness
</source>
     args:
<source lang='yaml'>
     - /server
livenessProbe:
    livenessProbe:
   tcpSocket:
      httpGet:
     port: 8080
        path: /healthz
  initialDelaySeconds: 15
        port: 8080
  periodSeconds: 20
        httpHeaders:
</source>
        - name: Custom-Header
<source lang='yaml'>
          value: Awesome
livenessProbe:
      initialDelaySeconds: 0
  httpGet:
      periodSeconds: 10
     path: /healthz
      timeoutSeconds: 1
     port: liveness-port
       successThreshold: 1
</source>
      failureThreshold: 3
<source lang='yaml'>
livenessProbe:
  httpGet:
    path: /healthz
    port: liveness-port
  failureThreshold: 1
  periodSeconds: 10
</source>
<source lang='yaml'>
livenessProbe:
  httpGet:
    httpHeaders:
      - name: Accept
        value: application/json
</source>
<source lang='yaml'>
livenessProbe:
  httpGet:
    httpHeaders:
       - name: Accept
        value: ""
</source>
</source>
==같이 보기==
* [[k8s 컨테이너 프로브]]
* [[k8s readinessProbe]]
* [[k8s startupProbe]]
* [[k8s terminationGracePeriodSeconds]]


==참고==
==참고==

2021년 10월 30일 (토) 23:11 판

1 개요

k8s livenessProbe
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
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
    httpHeaders:
    - name: Custom-Header
      value: Awesome
  initialDelaySeconds: 3
  periodSeconds: 3
livenessProbe:
  tcpSocket:
    port: 8080
  initialDelaySeconds: 15
  periodSeconds: 20
livenessProbe:
  httpGet:
    path: /healthz
    port: liveness-port
livenessProbe:
  httpGet:
    path: /healthz
    port: liveness-port
  failureThreshold: 1
  periodSeconds: 10
livenessProbe:
  httpGet:
    httpHeaders:
      - name: Accept
        value: application/json
livenessProbe:
  httpGet:
    httpHeaders:
      - name: Accept
        value: ""

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}