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

mongosh install properly

llama cpp running it in google colab