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

vllm : Failed to infer device type

android studio kotlin source is null error

gemini cli getting file not defined error