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

잔글 (봇: Kubernetes을(를) K8s(으)로 분류 대체함)
47번째 줄: 47번째 줄:
         - name: Custom-Header
         - name: Custom-Header
           value: Awesome
           value: Awesome
       initialDelaySeconds: 3
       initialDelaySeconds: 0
       periodSeconds: 3
       periodSeconds: 10
      timeoutSeconds: 1
      successThreshold: 1
      failureThreshold: 3
</source>
</source>



2020년 10월 1일 (목) 03:02 판

1 #

exec-liveness.yaml
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

2 #

exec-liveness.yaml
apiVersion: v1
kind: Pod
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: 0
      periodSeconds: 10
      timeoutSeconds: 1
      successThreshold: 1
      failureThreshold: 3

3 참고

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