Helm Chart Part 1 – Scheduler
Helm is the package manager for Kubernetes. You can download Helm from https://helm.sh/docs/ There are tutorials and how-to guides on the Helm site.
Once you have installed Helm, you can create your basic Helm chart. I have already created and setup the Helm chart in the Gitlab repository for the scheduler, https://gitlab.com/keckler-dev/scheduler
$ helm create scheduler
There are sever basic information that gets created
Chart.yaml – use for versioning your chart
values.yaml – default values for your chart’s variable
- You can create other values yaml file such as dev.yaml.
Templates directory is created and example deployment.yaml and service.yaml file are available.
Before you run the helm command, create the project and ensure your default project is set to the namespace where the Kubernetes objects will be created
$ oc create namespace scheduler
$ oc project scheduler
$ oc project
scheduler
In order to run the Helm command you should be in the Directory where the Helm chart starts.
$ helm install scheduler helm
- Scheduler is the Helm release name.
- helm is the directory of the helm chart
If there is a mistake in your helm chart, fix the issue and redeploy the helm chart
$ helm upgrade scheduler helm
After the Helm deployment, you will see the OpenShift Project scheduler with Kubernetes objects created.
The Deployments will show scheduler with 1 pod deployed.
The pod will be names scheduler-<random letter and numbers>. It should be running and the logs tab should show the program is running on port 8080.
In the Services object you will see the scheduler service. It will have an IP:8080 associate with it. Click on the service scheduler and it will take you to the details of the service.
Testing the install:
- Go the pods section and click on the scheduler pod.
- Go to the terminal tab
- You should be presented with an terminal ‘$’
- In the directory will be a teams.json file. We will use this file to test the program. Type in the following
$ curl -X POST -H "Content-Type: application/json" -d @teams.json http://localhost:8080/schedule
You will see the output of the matches created by the scheduler.
[{"matches":[{"away":"Bye","date":"2024-01-01","home":"Team
A"},{"away":"Team ………….
The Pod is working. Let’s test the service. From the desktop we are going to setup a port forward to the service. And query the service. Ensure you are in the project Scheduler.
$ kubectl port-forward service/scheduler 8080:8080 -n scheduler
If everything is correct you will see the port forwarding happening. The desktop localhost on port 8080 is pointing to the scheduler service in the OpenShift project scheduler. Execute the same curl command as above on your local desktop. You should see the same output.
If you get Failed to connect to localhost port 8080: Cannot connect to server. You probably killed the kubectl port forward command. Make sure it is running and use a different powershell/cmd interface for the curl command. Ensure the teams.json file is in the directory when you make your curl command.
By following this guide, you have successfully set up Helm and deployed a Helm chart for the Scheduler application on OpenShift. The process included creating the Helm chart, configuring it with necessary parameters, and deploying it to the OpenShift project. You also learned how to troubleshoot and upgrade your Helm chart if any issues arise during deployment. Finally, you validated the deployment by testing the application within the pod and through the service using port forwarding.
This setup ensures that your Kubernetes objects are properly managed and deployed, providing a robust environment for your Scheduler application. Whether you’re managing more complex applications or scaling your deployments, this foundational knowledge will be invaluable.
For more detailed information and further learning, don’t forget to explore the tutorials and guides available on the Helm documentation site.
Helm Chart Part 2 will be about the Scheduler form and how it interfaces with the scheduler service. We will also discuss the Route object and how it is setup with OpenShift Local.

