Bootstrap FreeKB - Helm - Deploy Chart using the helm install command
Helm - Deploy Chart using the helm install command

Updated:   |  Helm articles

You may want to first check out my article FreeKB - OpenShift - Deploy Hello Openshift.

This also assumes you've already installed the helm CLI on the system that you want to use to create the Helm chart to deploy Hello OpenShift.

Let's say you have the following files and directories for your Helm Chart. In this example, my-chart is a Chart used to deploy a Python app in a Kubernetes or OpenShift pod that contains a route so that the app can be reached via an HTTPS URL.

├── my-chart (directory)
│   ├── Chart.yaml
│   ├── values.yaml
│   ├── values.dev.yaml
│   ├── values.stage.yaml
│   ├── values.prod.yaml
│   ├── charts (directory)
│   └── templates (directory)
│       └── configmap.yaml
│       └── deployment.yaml
│       └── service.yaml
│       └── route.yaml
│       └── files (directory)
│           └── requirements.txt
│           └── app.py

 

The helm lint command can be used to determine if there are any syntax errors in the files in the my-chart directory. If there are no syntax errors, the failed count should be 0.

~]$ helm lint my-chart
==> Linting my-chart


1 chart(s) linted, 0 chart(s) failed

 

The helm template command can then be used as a dry run, to see the YAML files that would be created by the helm install command. In this example, values.dev.yaml is included because there are some unique variables for each environment and the chart will be deployed to namespace my-project.

helm template my-chart --values my-chart/values.dev.yaml --namespace my-project

 

The helm install command can be used to release the Helm Chart, deploying the various resources to the specified namespace. 

helm install my-release my-chart --values my-chart/values.dev.yaml --namespace my-project

 

The helm list command should then show the release.

]$ helm list --namespace my-project
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART           APP VERSION
my-release      my-project      1               2025-11-20 13:04:15.092443239 -0600 CST deployed        my-chart-0.1.0  0.0.1

 

And the resources should exist in the specified namespace.

~]$ oc get all --namespace my-project
NAME                           READY   STATUS     RESTARTS   AGE
pod/my-pod-d998f479f-bkfc2     1/1     Running    0          73s

NAME                  TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
service/my-service    ClusterIP   10.11.12.13     <none>        8080/TCP   73s

NAME                            READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/my-deployment   1/1     1            1           73s

NAME                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/my-deployment-d998f479f   1         1         1       73s

NAME                                 HOST/PORT                               PATH   SERVICES       PORT   TERMINATION   WILDCARD
route.route.openshift.io/my-route    my-project.apps.openshift.example.com          my-sevice      8080   edge          None

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 596dc8 in the box below so that we can be sure you are a human.