Kubernetes · kubectl ·
[Kubernetes] kubectl delete command
기본 구조 #
1kubectl delete [리소스 유형] [리소스 이름]
2
3# Pod 삭제하려면 다음과 같이 입력
4kubectl delete pod [파드 이름][명령어]
--help를 입력하면 더 다양한 옵션들을 찾을 수 있다. {: .prompt-info }
Option #
--all: 모든 리소스를 삭제--force: 강제 삭제--grace-period=<초>: 삭제될 때 대기할 시간을 초 단위로 설정--timeout=<초>: 명령이 실행될 때 대기할 최대 시간을 초 단위로 설정
1# 모든 파드를 강제로 삭제
2kubectl delete pod --all --force
3
4# 모든 종류의 리소스와 파드를 삭제
5kubectl delete all --all자주 쓰는 명령어는 kubectl-cheatsheet {: .prompt-info }
Advertisement