- Lab
- A Cloud Guru
Creating a Release in Helm
In this hands-on lab we will be working with release versions of charts in Helm.
Path Info
Table of Contents
-
Challenge
Update the Page Index in `nginx/values.yaml`, Set the Service to `NodePort` with an External Port of `30080`, and Increment the Version Number in `nginx/Chart.yaml`
Locate the
nginx
chart that is in the home directory:[cloud_user@host]$ cd ~ [cloud_user@host]$ ls -l
Modify the index contents found in the
values.yaml
file (with whatever editor you like -- we're using Vim here with vim ./values.yaml:index: >- ##insert your html here##
Set the service to
NodePort
and the HTTP port to30080
. The entry should match this:service: annotations: {} clusterIP: "" externalIPs: [] loadBalancerIP: "" loadBalancerSourceRanges: [] type: NodePort port: 8888 nodePort: "30080"
Set a version number in
Charts.yaml
. Edit it (with something likevim ./Chart.yaml
) and update the value forversion
. -
Challenge
Initialize and Patch Helm
Initilize helm using the following command.
helm init
Once helm is initilized patch it into the kube system using the following command.
kubectl patch deploy --namespace kube-system tiller-deploy -p'{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
-
Challenge
Release the Chart and Confirm the Version Number of the Released Chart
Release the chart:
[cloud_user@host]$ cd ~ [cloud_user@host]$ helm install nginx
Once that command has completed, run two commands. This returns the release name:
[cloud_user@host]$ helm ls --short
Look at the chart name for the version on this one.
[cloud_user@host]$ helm history <release name>
Obtain the IP address of one of the cluster nodes other than the master and navigate to the IP:Port in a web browser http://(node_IP)"30080"
Confirm that the index page is correct.
-
Challenge
Update the Index Data in the ./nginx/values.yaml File and Increment the Version Number in Charts. Upgrade the Release and Verify the New Version
Update the contents of the index as done previously
Increment the version number of the Chart.yaml file as done previously Upgrade the release.helm init
helm ls --short <-- this returns the release name helm upgrade (release name) ~/nginxVerify the new version of the release by checking the chart name in the helm history
helm history (release name)
Load the index page and confirm the content is correct.
-
Challenge
Rollback the Release to the Previous Version and Confirm that the Correct Version is Now Deployed
Get the available revisions for the helm release
helm ls --short <- this returns the release name helm history (release name)
locate the revision number that has the chart version that contains the first version you created.
helm rollback (release name) (revision number) helm history (release name) <-- verify the correct version is listed as "deployed"
Allow the pods volumes to update and check the web page content, it should be the first change you made.
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.