Overview: Deploy to Red Hat OpenShift using Helm charts
When it comes to deploying apps to Red Hat OpenShift, there are many options. One might begin their OpenShift experience by using the Source-to-Image option, where OpenShift pulls source code from a Git repository (repo) and builds the app.
That may suffice at first, but it’s not scalable or easily repeated. The next step, then, might be to build images on your PC and push them to an image registry—such as Quay.io—and then use the OpenShift web-based dashboard to pull the images into OpenShift. That works fine, but there’s no automation.
Moving to scripts and YAML files is a big step forward, and creating a CI/CD pipeline is perhaps the most desirable method of deploying an application.
Another method is by using Helm charts. Helm charts are popular and very useful when you wish to deploy multiple parts, or apps, at the same time. Consider a simple website that has a front end, a back-end service, and a database. A Helm chart can be used to deploy (or update) all of the pieces in one fell swoop. This learning path will help you get started with using Helm charts.
Prerequisites:
- Terminal session on your computer.
- A Developer Sandbox for Red Hat OpenShift account.
Git
command-line interface (CLI) installed on your computer (Git - Installing Git (git-scm.com)).- Helm CLI installed on your computer (Helm | Installing Helm).
- OpenShift
oc
CLI installed on your computer (Getting started with the OpenShift CLI - OpenShift CLI (oc) | CLI tools | OpenShift Container Platform 4.16).
In this learning path, you will:
- Learn how to create a Helm chart.
- Learn about Helm chart post-install hooks.
- Deploy two apps and a database using a Helm chart.