Copy to ClipboardCopied!Toggle word wrapToggle overflow
Pod에서 하나 이상의 프로세스가 OOM 종료된 경우 나중에 Pod가 종료되면(즉시 여부와 관계없이) 단계는 실패, 이유는 OOM 종료가 됩니다. restartPolicy 값에 따라 OOM 종료 Pod가 다시 시작될 수 있습니다. 재시작하지 않으면 ReplicationController와 같은 컨트롤러에서 Pod의 실패 상태를 확인하고 새 Pod를 생성하여 이전 Pod를 교체합니다.
재시작하지 않으면 Pod 상태는 다음과 같습니다.
oc get pod test
NAME READY STATUS RESTARTS AGE
test 0/1 OOMKilled 0 1m
oc get pod test -o yaml
...
status:
containerStatuses:
- name: test
ready: false
restartCount: 0
state:
terminated:
exitCode: 137
reason: OOMKilled
phase: Failed
$ oc get pod test
NAME READY STATUS RESTARTS AGE
test 0/1 OOMKilled 0 1m
$ oc get pod test -o yaml
...
status:
containerStatuses:
- name: test
ready: false
restartCount: 0
state:
terminated:
exitCode: 137
reason: OOMKilled
phase: Failed
Copy to ClipboardCopied!Toggle word wrapToggle overflow
재시작되는 경우 상태는 다음과 같습니다.
oc get pod test
NAME READY STATUS RESTARTS AGE
test 1/1 Running 1 1m
oc get pod test -o yaml
...
status:
containerStatuses:
- name: test
ready: true
restartCount: 1
lastState:
terminated:
exitCode: 137
reason: OOMKilled
state:
running:
phase: Running
$ oc get pod test
NAME READY STATUS RESTARTS AGE
test 1/1 Running 1 1m
$ oc get pod test -o yaml
...
status:
containerStatuses:
- name: test
ready: true
restartCount: 1
lastState:
terminated:
exitCode: 137
reason: OOMKilled
state:
running:
phase: Running
Copy to ClipboardCopied!Toggle word wrapToggle overflow