Difficulty is a relative thing. Deploying an application using containers can be much easier than trying to manage deployments of a traditional application over different environments, but trying to manage and scale multiple containers manually is much more difficult than orchestrating them using Kubernetes. But even managing Kubernetes applications looks difficult compared to, say, “apt-get install mysql”. Fortunately, the container ecosystem has now evolved to that level of simplicity. Enter Helm.
Helm is a Kubernetes-based package installer. It manages Kubernetes “charts”, which are “preconfigured packages of Kubernetes resources.” Helm enables you to easily install packages, make revisions, and even roll back complex changes.
Last year, when my colleague Maciej Kwiek gave a talk at Kubecon about Boosting Helm with AppController, we thought this might be a good time to give you an introduction to what it is and how it works. Now, as we get ready to talk about Helm and other applications, we thought we’d revisit and update those instructions.
Let’s take a quick look at how to install, configure, and utilize Helm.
$ sudo mv l*/helm /usr/local/bin/.
$HELM_HOME has been configured at /home/nick/.helm.
That’s all it takes to install Helm itself; now let’s look at using it to install an application.
As you can see, it’s called inky-manta, and it’s been successfully DEPLOYED.
This is a good example because we can see that this chart configures multiple types of resources: a Secret (for passwords), a persistent volume claim (to store the actual data), a Service (to serve requests) and a Deployment (to manage it all).
These notes are the basic documentation a user needs to use the actual application. There let’s see how we put it all to use.
Before you can do anything with that information, however, you need to do two things: get the root password for the database, and get a working client with network access to the pod hosting it.
Invalid character in input stream.
This is because of an error in base64 that adds an extraneous character. In this case, you will have to extract the password manually. Basically, we’re going to execute the same steps as this line of code, but one at a time.
Finally! So let’s go ahead and connect to the database.
Now we should be ready to actually connect. Remember to use the password we extracted in the previous step.
So we’ve successfully installed an application — in this case, MySql, using Helm. But what else can Helm do?
As you can see, we created a revision called inky-manta. It’s based on the mysql-0.3.4 chart, and its status is DEPLOYED.
Now if you list all of the active revisions, it’ll be gone.
OK, so what if we decide that we’ve changed our mind, and we want to roll back that deletion? Fortunately, Helm is designed for that. We can specify that we want to rollback our application to a specific revision (in this case, 1).
Next time, we’ll talk about how to use custom charts for Helm. Meanwhile, don’t forget to join us on March 14, 2018 for What’s New in Kubernetes 1.10.
Nick Chase is the editor of Open Cloud Digest and the author of Machine Learning for Mere Mortals.
When you run `helm install` Helm creates Release (not Revision) with name like “lucky-wildebeest”. After upgrade or rollback Release name will be the same but Revision number will increase.