Deploying an application on Kubernetes often requires dozens of YAML files. Helm solves this problem by allowing you to package, version, and deploy applications with a single command.
In the previous article, we saw how Kubernetes orchestrates our applications. But writing all those YAML files by hand is tedious and error-prone. Helm is the solution.
The problem: the YAML jungle
To deploy a WordPress application on Kubernetes, you need to create:
A Deployment for WordPress
A Service to expose WordPress
An Ingress for the domain and SSL
A PersistentVolumeClaim for files
A Secret for database credentials
A ConfigMap for configuration
Potentially NetworkPolicies, ResourceQuotas…
That’s easily 200-300 lines of YAML per application. Multiply by the number of clients, and you understand the problem.
And if you want to change the domain? You need to modify multiple files. Add more RAM? More files again.
The solution: Helm, the Kubernetes package manager
Helm is often described as the “apt-get” or “brew” of Kubernetes. It allows you to:
Package an application into a reusable “chart”
Parameterize via a simple values file
Version deployments
Update or rollback easily
“A Helm Chart is a ready-to-use Kubernetes application, customizable via a configuration file.”
# Validate syntax
helm lint ./my-chart
# See generated YAML without deploying
helm template my-release ./my-chart --values values.yaml
# Test in a dev namespace
helm upgrade --install test ./my-chart -n dev --values values-dev.yaml
But we still deploy manually. In the final article of this series, we’ll see how GitLab CI/CD and GitOps enable automatic deployment as soon as we push code.
🚀 Want to standardize your deployments?
We can create custom Helm charts for your applications, or train you on their use. Save time and reduce errors.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.