- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
Installing and Testing Helm and Tiller
This Hands-On Lab is intended to provide practice with installing and configuring Helm in a Kubernetes environment.
Lab Info
Table of Contents
-
Challenge
Install Helm and Tiller in the Existing Cluster
Download the helm binary release:
[user@host]$ curl https://get.helm.sh/helm-v2.17.0-linux-amd64.tar.gz > ./helm.tar.gzExtract the archive:
[user@host]$ tar -xvf ./helm.tar.gzNavigate to the
linux-amd64directory:[user@host]$ cd linux-amd64Move the
helmandtillerexecutable files to the/usr/local/bindirectory:[user@host]$ sudo mv ./helm /usr/local/bin [user@host]$ sudo mv ./tiller /usr/local/binRun the
helm versioncommand to ensure that the helm command is available:[user@host]$ helm versionInstall tiller:
[user@host]$ helm init --stable-repo-url https://charts.helm.sh/stableRun the version command again to ensure that Tiller is available:
[user@host]$ helm version -
Challenge
Deploy, Troubleshoot, and Verify Deployment of the NGINX Chart
Ensure that you are in the
cloud_userhome directory. This directory contains thenginxchart at/home/cloud_user/nginx:[cloud_user@host]$ cd ~This command should return a directory listing containing
Chart.yaml:[cloud_user@host]$ls ./nginxInstall the nginx chart:
[cloud_user@host]$ helm install ./nginxThis command should error with a "name" error, due to the
tillerservice account missing.
Add thetillerservice account:[cloud_user@host]$ kubectl create serviceaccount --namespace kube-system tiller [cloud_user@host]$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller [cloud_user]$ kubectl patch deploy --namespace kube-system tiller-deploy -p'{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'Wait for the tiller pod to restart with the update, and then install the
nginxexample chart:[cloud_user@host]$ helm install ./nginxOnce the release has completed and you see the release output, locate the cluster IP for the service that has been created. Then confirm that the
nginxpod has been deployed correctly.[cloud_user@host]$ curl "service cluster ip":8888This should return an html message.
Clean up the test deployment, get the release name from Helm, and then delete the release:
[cloud_user@host]$ helm ls --short [cloud_user@host]$ helm delete "return from previous command"Confirm that the release has been removed. The following commands should return nothing:
[cloud_user@host]$ helm ls [cloud_user@host]$ kubectl get pods
About the author
Real skill practice before real-world application
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.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.