Batch pipeline, mission 5 of 6

Pile-up

advanced, about 10 minutes, in the Kubernetes Simulator

Start mission

Opens once you pass Every night.

The briefing

The inventory sync is scheduled every minute, but lately each run takes two and a half. Kubernetes' default is to start the next run anyway — so runs pile up on top of each other, fighting over the same rows.

A CronJob's concurrencyPolicy decides what happens when a run is due and the last one hasn't finished: Allow (the default) starts another, Forbid skips this one, Replace stops the old run and starts fresh.

What you'll do

  • Stop runs overlapping: set concurrencyPolicy on sync
  • At most one sync run active
  • Bonus star: Cap how long any run may take: activeDeadlineSeconds on the job template

The mission checks the cluster, not your keystrokes: any fix that works, passes.

More Batch pipeline missions

  1. 1. Run it once
  2. 2. When a job fails
  3. 3. Many hands
  4. 4. Every night
  5. 5. Pile-up
  6. 6. The 2am failure
Every Kubernetes Simulator mission

AboutGuidesCompare

PrivacyCookiesTerms

Hackademy is a trading name of Mather Software Ltd, registered in England and Wales, company number 17443861. ICO registration ZC256628.

Contact: support@mathersoftware.com© 2026 Mather Software Ltd