Creating Helm Charts

45 minutes
  • 3 Learning Objectives

About this Hands-on Lab

There are some instances in which a chart for your application might not exist and one must be created; in other cases, you might have a Kubernetes deployment that you want to convert into a Helm chart. In this hands-on lab, we will take an existing deployment and convert it into a Helm chart.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Convert the Service Manifest into a Service Template in a New Helm Chart

Create a folder for the new chart and name it blog. Create the minimum necessary scaffolding for the new chart. Locate the existing manifest for the service in the /home/cloud_user/kubernetes directory. Copy the service.yaml file into the new charts template directory. Take the necessary values from the service.yaml file and create entries in the values.yaml file. Create the necessary directives to set the values in the service.yaml template. Make sure the service type is NodePort and the nodePort value is 30080.

Convert the Application Manifest into a Deployment Template in a New Helm Chart

Locate the existing manifest for the application in the /home/cloud_user/kubernetes directory. Copy the application.yaml file into the new charts template directory and name it deployment.yaml. Take the necessary values from the deployment.yaml file and create entries in values.yaml. Create the necessary directives to set the values in the service.yaml template.

Ensure the Manifests Render Correctly and Deploy the Application as a NodePort Application

Use the --dry-run option of the install command to review the manifests and ensure they render correctly. After they are verified, deploy the application, then access the appliation on the primary server’s public IP address at the node port.

Additional Resources

Your enterprise has an existing Kubernetes deployment they would like to have converted into a Helm chart. You have been tasked with taking the service as well as the application and combining them into a single Helm chart. In addition, this chart should be able to be deployed as either a nodePort service or a loadBalancer service. If the service is nodePort, then the node port should be set to 30080.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?