Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lösche alte erfolgreiche CronJobs #4

Open
webwurst opened this issue Feb 28, 2017 · 0 comments
Open

Lösche alte erfolgreiche CronJobs #4

webwurst opened this issue Feb 28, 2017 · 0 comments
Assignees

Comments

@webwurst
Copy link
Member

ungefähr sowas:

for job_name in (kubectl get --all-namespaces jobs -o json | jq -c '.items[] | select(.status.succeeded==1) | [.metadata.namespace,.metadata.name]')
  set namespace (echo $job_name | jq -r '.[0]')
  set name (echo $job_name | jq -r '.[1]')
  kubectl --namespace "$namespace" delete job "$name"
end
@webwurst webwurst self-assigned this Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

1 participant