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

 
(사용자 2명의 중간 판 8개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==#==
==개요==
{{소스헤더|exec-liveness.yaml}}
;k8s livenessProbe
<source lang='yaml'>
* [[k8s Probe]] 중 하나
 
<syntaxhighlight lang='yaml' line highlight='15'>
apiVersion: v1
apiVersion: v1
kind: Pod
kind: Pod
23번째 줄: 25번째 줄:
       initialDelaySeconds: 5
       initialDelaySeconds: 5
       periodSeconds: 5
       periodSeconds: 5
</source>
</syntaxhighlight>
<syntaxhighlight lang='yaml' line>
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
    httpHeaders:
    - name: Custom-Header
      value: Awesome
  initialDelaySeconds: 3
  periodSeconds: 3
</syntaxhighlight>
<syntaxhighlight lang='yaml' line>
livenessProbe:
  tcpSocket:
    port: 8080
  initialDelaySeconds: 15
  periodSeconds: 20
</syntaxhighlight>
<syntaxhighlight lang='yaml' line>
livenessProbe:
  httpGet:
    path: /healthz
    port: liveness-port
</syntaxhighlight>
<syntaxhighlight lang='yaml' line>
livenessProbe:
  httpGet:
    path: /healthz
    port: liveness-port
  failureThreshold: 1
  periodSeconds: 10
</syntaxhighlight>
<syntaxhighlight lang='yaml' line>
livenessProbe:
  httpGet:
    httpHeaders:
      - name: Accept
        value: application/json
</syntaxhighlight>
<syntaxhighlight lang='yaml' line>
livenessProbe:
  httpGet:
    httpHeaders:
      - name: Accept
        value: ""
</syntaxhighlight>


==#==
==같이 보기==
{{소스헤더|exec-liveness.yaml}}
* [[k8s 컨테이너 프로브]]
<source lang='yaml'>
* [[k8s readinessProbe]]
apiVersion: v1
* [[k8s startupProbe]]
kind: Pod
* [[k8s terminationGracePeriodSeconds]]
metadata:
  labels:
    test: liveness
  name: liveness-http
spec:
  containers:
  - name: liveness
    image: k8s.gcr.io/liveness
    args:
    - /server
    livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
        httpHeaders:
        - name: Custom-Header
          value: Awesome
      initialDelaySeconds: 3
      periodSeconds: 3
</source>


==참고==
==참고==
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/


[[분류: kubernetes]]
[[분류:K8s Probe]]

2022년 2월 13일 (일) 16:12 기준 최신판

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 }}