Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Creating a Release in Helm

In this hands-on lab we will be working with release versions of charts in Helm.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 0m
Published
Clock icon Apr 05, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. 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 to 30080. 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 like vim ./Chart.yaml) and update the value for version.

  2. Challenge

    Initialize and Patch Helm

    Initilize helm using the following command.

    helm init
    

    Once helm is initilized patch it into the kube sytem using the following command.

    kubectl patch deploy --namespace kube-system tiller-deploy -p'{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
    
  3. 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.

  4. 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) ~/nginx

    Verify the new verison 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.

  5. 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.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

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.

Start learning by doing today

View Plans