deleting pods from cronjob

 Sometimes after your k8s cronjob runs, you will get some pods left with completed but terminated state. 

In order to remove these pods, you can configure these history to be removed via yaml 

spec: 
    failedJobsHistoryLimit: 0
    successfulJobsHistoryLimit: 0


You can also delete by running the following command:  

kubectl delete pod --field-selector=status.phase==Succeeded


Comments

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type