전산쟁이의 기억노트

k8s 강제로 pod 종료시키는 방법 본문

컨테이너&가상화

k8s 강제로 pod 종료시키는 방법

잘나가는전산쟁이 2022. 7. 24. 00:21
728x90
반응형
SMALL

k8s기반에서 강제로 pod 종료

죽지않는 pod 정보
[root@control1 ~]# kubectl get  pod test-68d6bf4d95-zhx55 -n test_user
NAME                       READY   STATUS        RESTARTS   AGE
test-68d6bf4d95-zhx55   1/4     Terminating   0          68d
강제로 pod 삭제 
[root@control1 ~]# kubectl delete  pod test-68d6bf4d95-zhx55 -n test_user -grace-period=0 -force
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
pod "test-68d6bf4d95-zhx55" force deleted
pod 정보 없는거 확인
[root@control1 ~]# kubectl get  pod test-68d6bf4d95-zhx55 -n test_user
Error from server (NotFound): pods "test-68d6bf4d95-zhx55" not found

 

 

출처 - http://igoni.kr/books/linux/page/k8s-pod

 

728x90
반응형
LIST
Comments