For the last six months, the Acme Anvil Corporation has been migrating some of their bare metal infrastructure to Docker containers. A schism has developed between the members of your team on whether to use Docker Swarm or Kubernetes. To settle the dispute, your manager has decided to create a series of challenges. You have been tasked with using Helm charts to create an application using the `httpd` image. The service should be publicly accessible using NodePort.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Install Helm
Use
curl
to create a local copy of the Helm install script:curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > /tmp/get_helm.sh
Use
chmod
to modify access permissions for the install script:chmod 700 /tmp/get_helm.sh
Set the version to
v2.8.2
:DESIRED_VERSION=v2.8.2 /tmp/get_helm.sh
Ensure Helm uses the correct stable chart repo (the default one used by Helm has been decommissioned):
helm init --stable-repo-url https://charts.helm.sh/stable
Initialize Helm:
helm init --wait
- Create a Helm Chart
Create the
charts
directory and change your working directory tocharts
:mkdir charts
cd charts
Create the chart for
httpd
:helm create httpd
Edit
httpd/values.yaml
:replicaCount: 1 image: repository: httpd tag: latest pullPolicy: IfNotPresent service: type: NodePort port: 80 ingress: enabled: false annotations: {} path: / hosts: - chart-example.local tls: [] resources: {} nodeSelector: {} tolerations: [] affinity: {}
- Create Your Application Using Helm
Create your application:
helm install --name my-httpd ./httpd/