Kubernetes: active job is erroneously marked as completed after cluster upgrade

2/28/2017

I have a working kubernetes cluster (v1.4.6) with an active job that has a single failing pod (e.g. it is constantly restarted) - this is a test, the job should never reach completion.

  • If I restart the same cluster (e.g. reboot the node), the job is properly re-scheduled and continues to be restarted
  • If I upgrade the cluster to v1.5.3, then the job is marked as completed once the cluster is up. The upgrade is basically the same as restart - both use the same etcd cluster.

Is this the expected behavior when going to v1.5.x? If not, what can be done to have the job continue running? I should provide a little background on my problem - the job is to ultimately become a driver in the update process and it is important to have it running (even in face of cluster restarts) until it achieves a certain goal. Is this possible using a job?

-- deemok
kubernetes

1 Answer

2/28/2017

In v1.5.0 extensions/v1beta1.Jobs was deprecated in favor of batch/v1.Job, so simply upgrading the cluster without updating the job definition is expected to cause side effects.

See the Kubernetes CHANGELOG for a complete list of changes and deprecations in v1.5.0.

-- Antoine Cotten
Source: StackOverflow