Skip to main content
Redhat Developers  Logo
  • Start building apps

    Try Red Hat products now

    • Developer Sandbox for Red Hat OpenShift
      Try Red Hat's products and technologies without setup or configuration free for 30 days with this shared OpenShift and Kubernetes cluster.

    Hands-on learning

    • Learning paths
      Customize your learning to align with your needs and make the most of your time by exploring our massive collection of paths and lessons.

    Looking for more?

  • Products & technologies

    Linux

    • Red Hat Enterprise Linux
    • Red Hat Universal Base Images (UBI)
    • Red Hat Enterprise Linux for SAP Applications
    • Microsoft SQL Server on Red Hat Enterprise Linux
    • CentOS Linux

    Kubernetes

    • Red Hat OpenShift
    • Red Hat OpenShift Service on AWS (ROSA)
    • Microsoft Azure Red Hat OpenShift
    • Red Hat OpenShift Dedicated
    • Red Hat OpenShift on IBM Cloud
    • Red Hat OpenShift Data Science

    Automation

    • Red Hat Ansible Automation Platform
    • Red Hat Ansible Lightspeed with IBM watsonx Code Assistant
    • Red Hat Ansible Automation Platform on Microsoft Azure
    • Red Hat Ansible Automation Platform via AWS Marketplace
    • Ansible automation for applications and services
    • DevOps
    • Java runtimes and frameworks

    • JBoss Enterprise Application Platform
    • Red Hat build of Quarkus
    • Red Hat build of OpenJDK
    • Integration

    • Red Hat Service Interconnect
    • AMQ Broker
    • Developer tools

    • Red Hat Developer Hub
    • Red Hat Trusted Application Platform

    Looking for more

    • See all Red Hat Products
    • Browse all technologies
  • Events

    Join the DevNation community

    • DevNation events calendar
      Join us for online events, or attend regional events held around the world—you'll meet peers, industry leaders, and Red Hat's Developer Evangelists and OpenShift Developer Advocates.

    Looking for more?

    • Explore all developer events
  • Learn

    Featured free learning paths

    • Openshift & Kubernetes learning
    • OpenShift Data Science learning
    • OpenShift API Management learning

    More developer resources

    • Cheat sheets
    • E-books
    • Interactive tutorials
    • API Catalog and Documentation
    • Blogs and articles

    Looking for more?

    • Start learning now
  • Developer Sandbox

    Developer Sandbox (free)

    • Try hands-on activities in the Developer Sandbox
      Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore the Developer Sandbox IDE

    Featured Developer Sandbox activities

    • Deploy a Java application on Kubernetes in minutes
    • Learn Kubernetes using the Developer Sandbox
    • Deploy full-stack JavaScript apps to the Developer Sandbox

    Ready to start developing apps?

    • Explore the free Developer Sandbox
  • DevNation

    Explore the community

    • What’s DevNation?
      Join developers across the globe for live and virtual events led by Red Hat technology experts.
    • Deep Dives
    • Tech Talks
    • The Show

    Upstream communities

    • Camel K
    • CentOS
    • Istio
    • Quarkus

    Looking for more DevNation?

    • Explore DevNation
  • Blog

< DevNation Day India

DevNation Day India 2021 - De-mystify Helm Chart Hooks

Abstract

Helm provides a mechanism in the form of hooks to intervene at certain points in a deployment life cycle. In this talk, I will explain hooks in the simplest form along with a Practical use case. I will showcase DB initialization post-install, DB backup pre-upgrade & more such use cases for MySQL DB.

Helm Chart deployment life cycle comprises of following:

  1. Install
  2. Upgrade
  3. Rollback (In case of failure)
  4. Delete

So If you want to perform a certain task at a particular stage before or after then hooks become the obvious choice. Helm provides a total of 9 Hooks, Two (Pre & Post) for each stage for e.g. pre-install & post-install, and one for the test.

To explain the hooks I will use MySQL DB in the form of a container. I will showcase the following scenarios with MySQL DB deployment lifecycle:

  1. DB initialization post-install.
  2. DB backup pre-upgrade.
  3. DB restore post-rollback.
  4. Clean up post-delete

All the above scenarios are practical and widely performed by DB Admins. With Helm Hooks, I am trying to automate all these tasks through Kubernetes Job.

The talk will include both a presentation and a demo on the above scenarios.

  Sagar Jadhav, Software Engineer, IBM

Sagar Jadhav has over 8+ years of experience in Software Development. He has experience in a wide range of tools & technologies such as Java, Cloud, Kubernetes, Golang, Terraform, etc. He is currently working as a Software Engineer at IBM. He is working in Hybrid Cloud Space and currently working on a product used for Infrastructure automation and management. He is always keen to learn new technologies specifically related to DevOps & Cloud-Native and also believes in sharing the same with others through meetups, conferences, webinars & blogs. Find him on LinkedIn.

Red Hat Developers logo LinkedIn YouTube Twitter Facebook

Products

  • Red Hat Enterprise Linux
  • Red Hat OpenShift
  • Red Hat Ansible Automation Platform
  • See all products
  • See all technologies

Build

  • Developer Sandbox
  • Developer Tools
  • Interactive Tutorials
  • API Catalog
  • Operators Marketplace

Quicklinks

  • Learning Resources
  • E-books
  • Cheat Sheets
  • Blog
  • Events

Communicate

  • About us
  • Contact sales
  • Find a partner
  • Site Status Dashboard
  • Report a security problem

RED HAT DEVELOPER

Build here. Go anywhere.

We serve the builders. The problem solvers who create careers with code.

Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

Sign me up

We’ve updated our Privacy Statement effective July 1, 2023

Red Hat legal and privacy links

  • About Red Hat
  • Jobs
  • Events
  • Locations
  • Contact Red Hat
  • Red Hat Blog
  • Diversity, equity, and inclusion
  • Cool Stuff Store
  • Red Hat Summit

Red Hat legal and privacy links

  • Privacy statement
  • Terms of use
  • All policies and guidelines
  • Digital accessibility