Wanted to just write some quick notes down here of what I've seen attempting to use Helm
So here we're using Kubernetes, it likes to use yaml files to do lots of desired state of running various bits of content (containers, pods that kind of thing).
Helm is there to reduce the overhead of the complex yaml to define packages of services and applications that run and making values very parameterisable.
Good video here by Donovan Brown to give you the gist:
In classic youtube style, "Let's get started...."
First we need to install tools. Have a look at my Getting Started with Kube article. This'll get you starting to be able to play with Kubernetes.
Next quick few tools (I'm going to install via brew) you can find the installs at https://brew.sh
1#installs brew 2/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 3 4#installs helm 5brew install helm 6 7#installs watch and tree (handy tools to watch progress of stuff) 8brew install watch 9brew install tree
So thats our installs. I'm going to use minikube in this walkthrough, start your kube engines and check its working
1minikube start 2kubectl configs get-contexts 3 4 5CURRENT NAME CLUSTER AUTHINFO NAMESPACE 6 kubernetes-admin@kubernetes kubernetes kubernetes-admin 7* minikube minikube minikube default
This shows I've got two configured connections to clusters, of which my minikube one is the default and current one.
in a second terminal window, lets start a watch on the current state of the minikube cluster, as you can see he's not busy:
1watch kubectl get all 2 3NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE 4service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 14h
So we're ready for a bit of helm. I'm going to start a jenkins pod in my minikube cluster
Helm first needs a repo to point at
1helm repo add jenkins https://charts.jenkins.io 2helm repo update
Now in the video above, Donovan Brown discusses using the raw yaml to mess about with helm charts, when we use the repo we download a compressed *.tgz file of that which contains everything needed to run on the cluster. So we could either just run the package by doing:
1helm install jenkins/jenkins --generate-name 2 3#or 4 5helm pull jenkins/jenkins 6tar xfz jenkins-3.2.1.tgz 7cd jenkins 8helm install . --generate-name
if you quickly switch over to your kubectl watch window you can now see it deploy:
1NAME READY STATUS RESTARTS AGE 2pod/jenkins-1615378175-0 2/2 Running 0 2m8s 3 4NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE 5service/jenkins-1615378175 ClusterIP 10.102.148.204 <none> 8080/TCP 2m8s 6service/jenkins-1615378175-agent ClusterIP 10.99.202.85 <none> 50000/TCP 2m8s 7service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 14h 8 9NAME READY AGE 10statefulset.apps/jenkins-1615378175 1/1 2m8s
...and now to tidy up. (xxxxx is the name of the jenkins install you want to delete)
1helm ls 2helm uninstall jenkins-xxxxxxxx 3minikube stop
Helm looks to save a lot of kubectl'ing commands.