Skip to content

If a cronjob fails, the corresponding pod isn't deleted. It repeats for every new pod.  #65010

@vineetchawla

Description

@vineetchawla

/kind bug
/sig bugs

What happened:
I created a cronjob using an example to echo "Hello world" every minute. Works perfectly.
If instead I replace the function to be called to wget with an unreachable website, the new pods keep being created and the older ones aren't deleted.
screen shot 2018-06-12 at 10 32 19

What you expected to happen:
I expected that once the pod for the job fails it should be deleted.

How to reproduce it (as minimally and precisely as possible):
kubectl run hello --schedule="*/1 * * * *" --restart OnFailure --image busybox -- /bin/wget www.asdf.asdf

Anything else we need to know?:
I just used the wrong website as an example to create cronjob failure. Any other command that fails results in the same issue

Environment:

  • Kubernetes version (use kubectl version): v1.8.6
  • Cloud provider or hardware configuration: minikube 1.9
  • OS (e.g. from /etc/os-release): Mac high sierra
  • Kernel (e.g. uname -a): darwin kernel 17.3.0
  • Install tools:
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.sig/appsCategorizes an issue or PR as relevant to SIG Apps.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions