0Pricing
Helm Academy · Lesson

A Database Migration pre-upgrade Job

Annotating a Job to run before the rollout.

A Real Use Case

Before new app code rolls out, your database schema often needs migrating. A pre-upgrade hook is the perfect spot to run that migration safely.

Why Before the Rollout

Running it as pre-upgrade means the schema is ready before the new pods start. The fresh code never talks to an old, mismatched database.

"helm.sh/hook": pre-upgrade

All lessons in this course

  1. What Hooks Are and When They Fire
  2. A Database Migration pre-upgrade Job
  3. Hook Weights and Ordering
  4. Hook Deletion Policies
← Back to Helm Academy