Kubernetes has a ton of pods in error state that can't seem to be cleared

后端 未结 4 1855
执笔经年
执笔经年 2021-02-13 20:01

I was originally trying to run a Job that seemed to get stuck in a CrashBackoffLoop. Here was the service file:

apiVersion: batch/v1
kind: Job
metadata:
  name:         


        
4条回答
  •  感情败类
    2021-02-13 20:24

    Here you are a quick way to fix it :)

    kubectl get pods | grep Error | cut -d' ' -f 1 | xargs kubectl delete pod
    

    Edit: Add flag -a if you are using an old version of k8s

提交回复
热议问题