Skip to content

Latest commit

 

History

History
169 lines (105 loc) · 4.95 KB

File metadata and controls

169 lines (105 loc) · 4.95 KB

Practice Test Helm Concepts

Take me to the lab

  1. Which command is used to search for a wordpress helm chart package from the Artifact Hub?

    Run helm search hub command to search specific charts on Artifact Hub.

    helm search hub wordpress
  2. Add a bitnami helm chart repository in the controlplane node.
    name - bitnami

    Use helm repo add to add a named repository to your local repository cache.

    helm repo add bitnami https://charts.bitnami.com/bitnami
  3. Which command is used to search for the joomla package from the added repository?

    Run helm search repo to search specific packages from local repositories that have been added with helm repo add

    helm search repo joomla
  4. What is the app version of joomla in the bitnami helm repository?

    Determine this from the output of the command you ran in Q3. Examine the APP VERSION result column.

  5. Which chart version can you see for the joomla package in the bitnami helm repo?

    Again from the results of Q3, examine the CHART VERSION column.

  6. How many helm repositories are added in the controlplane node?

    Use helm repo list to list local repos and count them. Alternatively, if there are lots then wc can be used to count the lines output by the helm command. This saves time in the exam!

    helm repo list | wc -l

    Subtract one from the result, as it has also counted the headings line.

  7. Install drupal helm chart from the bitnami repository.
    • Release name should be bravo.
    • Chart name should be bitnami/drupal.

    The syntax of the command is helm install release_name chart_name, therefore

    1. Install

      helm install bravo bitnami/drupal
    2. Verify

      helm list
      
  8. Which command is used to list packages installed using helm?

    You already did this in Q7 to verify the chart installation!

    helm list

  9. Uninstall the drupal helm package which we installed earlier.

    The syntax of the command is helm uninstall release_name, therefore

    helm uninstall bravo
    
  10. Download the bitnami apache package under the /root directory.

    Note that although the question doesn't explicitly mention it, you need to also unpack the downloaded chart. Charts are downloaded as tarballs (like a zip file), so we must additionally tell it to unpack with the --untar argument.

    helm pull is used to download charts without installing them.

    helm pull --untar bitnami/apache
    

    This will download the chart and unzip it into a new folder which is the name of the chart (e.g. apache)

  11. Inspect the file values.yaml and make changes so that 2 replicas of the webserver are running and the http is exposed on nodeport 30080.

    We know that the chart is now unpacked to the new directory apache. You can see this by running ls -l

    You are given a URL for the chart installation documentation. Open that in another browser tab or window.

    1. Open values.yaml in vi

      vi apache/values.yaml
    2. Search the doc for replica. We see that the property is called replicaCount. Find this in vi and set it to 2

    3. Search the doc for nodePort. We see that there's a property service.nodePorts.http. This is what we want. The dotted syntax gives you the YAML path to the property in the file, therfore you'll find it by looking through the values file for

      # scroll past lots of stuff...
      service:
        # more stuff...
        nodePorts:
           http:
      

      Set the value for http to 30080.

      For correctness we should also set service.type from LoadBalancer to NodePort, however it will work without this.

  12. Install the apache from the downloaded helm package.
    • Release name: mywebapp

    Note that we need to install our edited version of the chart, therefore instead of passing the name of the chart to helm, we instead point it at the directory containing our edited chart.

    helm install mywebapp ./apache
  13. You can access the Apache default page by clicking on mywebapp link from the top of the terminal.

    It should respond with It works!