EasyEnv
Helm
AdvancedLesson 8 of 1030 min · hands-on

Hooks and Tests

Part of the Helm course

Some work does not fit neatly into "render a manifest and apply it." A database schema needs to be migrated before the new application pods start reading from it, or an admin account needs to exist right after a fresh install finishes, or you want an automatic smoke test that pokes the service and confirms it actually answers before you walk away from a deploy.

There is no kind: Hook anywhere in Kubernetes or in Helm. A hook is an ordinary Kubernetes resource, most often a Job or a Pod, that carries a particular annotation Helm watches for. There is no templates/pre-install-job.yaml in your lesson folder yet. Create it with this Job: press Play on the block and the file is made for you. Pressing Play again does not make a second copy. ...

Want to learn Helm Hooks and Tests in a real environment?

Click below, get a fresh Linux box with Helm ready to go, and work through Hooks and Tests hands-on with an AI tutor that knows your code.

Start this lessonHooks and Tests

What you'll learn

  • Helm.sh/hook annotation
  • Pre-install
  • Post-install
  • Pre-upgrade
  • Hook-delete-policy
  • Helm test
  • Test pod pattern
  • When hooks are evil

Read this lesson in your language

All lessons in this course

10 lessons
  1. 1What Is Helm20 min
  2. 2Installing Charts30 min
  3. 3Chart Structure30 min
  4. 4Values and Templating35 min
  5. 5Helpers and Named Templates30 min
  6. 6Dependencies and Subcharts30 min
  7. 7Release Management30 min
  8. 8Hooks and Tests30 min
  9. 9Publishing Charts30 min
  10. 10Capstone: Your Own Chart60 min

Explore other courses

Hooks and Tests - Helm (English) | Engineering Courses