Job

delete completed job

kubectl delete jobs --field-selector status.successful=1

delete fail job or long running job

kubectl delete jobs --field-selector status.successful=0

TTLAfterFinished

์ด ๊ธฐ๋Šฅ์ด 1.21 ๋ฒ„์ „๋ถ€ํ„ฐ๋Š” ๊ธฐ๋ณธ์œผ๋กœ ํฌํ•จ์ด ๋˜์—ˆ๋‹ค.

ํ˜„์žฌ๊นŒ์ง€๋Š” job์—๋งŒ ์ ์šฉ์ด ๋˜๋‚˜ ๋‚˜์ค‘์— ํ™•์žฅ๋  ์˜ˆ์ • 1.21์—์„œ beta

https://kubernetes.io/ko/docs/reference/command-line-tools-reference/feature-gates/

job์— .spec.ttlSecondsAfterFinished ๋ฅผ ์„ค์ •ํ•˜๋ฉด ๊ทธ์‹œ๊ฐ„ ์ดํ›„๋กœ ์ž๋™์œผ๋กœ ์‚ญ์ œ๋œ๋‹ค.

percona xtradb cluster operator์—์„œ๋Š” .spec.ttlSecondsAfterFinished ์„ ํฌํ•จํ•˜์ง€ ์•Š๋Š”๋“ฏ ๋ณด์ธ๋‹ค.

์ด๊ฒŒ ์ง€์›์ด ๋ ๋•Œ๊นŒ์ง€ ์ˆ˜๋™์œผ๋กœ ์ง€์›Œ์•ผํ• ๋“ฏ

Last updated