K8s 모든 Job 삭제

1 개요[ | ]

k8s delete all jobs in bulk
k8s 모든 Job 삭제
NAMESPACE=네임스페이스
kubectl delete job -n $NAMESPACE $(kubectl get job -n $NAMESPACE -o custom-columns=:.metadata.name)
$ NAMESPACE=mycron
$ kubectl delete job -n $NAMESPACE $(kubectl get job -n $NAMESPACE -o custom-columns=:.metadata.name)
job.batch "cronjob1-1603324800" deleted
job.batch "cronjob1-1603411200" deleted
job.batch "cronjob1-1603497600" deleted
job.batch "cronjob1-manual-jbc" deleted
job.batch "cronjob2-1602316200" deleted
job.batch "cronjob2-1603544400" deleted
job.batch "cronjob2-1603545000" deleted
...

2 같이 보기[ | ]

3 참고[ | ]

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