"K8s Pod Terminating"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 3개는 보이지 않습니다)
2번째 줄: 2번째 줄:
;K8s pod Terminating
;K8s pod Terminating
;k8s pods stuck in terminating status
;k8s pods stuck in terminating status
* 증상: 팟이 Terminating 상태에 머물러 있음
* 증상: 파드가 Terminating 상태에 머물러 있다.
* 조치방법
* 조치방법
<syntaxhighlight lang='bash'>
<syntaxhighlight lang='bash'>
kubectl -n 네임스페이스 delete pods --grace-period=0 --force
kubectl -n 네임스페이스 delete pods --grace-period=0 --force 파드명
</syntaxhighlight>
 
==만들기==
<syntaxhighlight lang='yaml'>
apiVersion: v1
kind: Pod
metadata:
  name: long-terminating-pod
spec:
  containers:
  - name: my-container
    image: busybox
    command: ["sh", "-c", "while true; do sleep 10; done"]
    lifecycle:
      preStop:
        exec:
          command: ["sh", "-c", "while true; do sleep 10; done"]
</syntaxhighlight>
<syntaxhighlight lang='bash'>
kubectl delete pod long-terminating-pod --grace-period=3600
</syntaxhighlight>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[k8s pod STATUS]]
* [[k8s pod STATUS]]
* [[K8s Terminating]]
* [[kubectl delete pods]]
* [[kubectl delete pods]]



2025년 2월 19일 (수) 16:30 기준 최신판

1 개요[ | ]

K8s pod Terminating
k8s pods stuck in terminating status
  • 증상: 파드가 Terminating 상태에 머물러 있다.
  • 조치방법
kubectl -n 네임스페이스 delete pods --grace-period=0 --force 파드명

2 만들기[ | ]

apiVersion: v1
kind: Pod
metadata:
  name: long-terminating-pod
spec:
  containers:
  - name: my-container
    image: busybox
    command: ["sh", "-c", "while true; do sleep 10; done"]
    lifecycle:
      preStop:
        exec:
          command: ["sh", "-c", "while true; do sleep 10; done"]
kubectl delete pod long-terminating-pod --grace-period=3600

3 같이 보기[ | ]

4 참고[ | ]

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