DEV Community


Helm & Kubernetes: How They Work Together to Boost Developer Productivity?

pavanbelagatti profile image Pavan Belagatti ・4 min read

Part of the article is originally published on HackerNoon

I won't explain how Kubernetes works because I recently shared it in my other post, below for your reference.

Why is Kubernetes so powerful?

  • Horizontal scaling
  • Self-healing
  • Load balancing and service discovery
  • Automated rollouts and rollbacks
  • Storage orchestration
  • Batch execution
  • Configuration management

What is Helm & how it works?

Helm is a tool for Kubernetes that helps you install and manage applications. In terms of architecture, Helm has two sides, there is a client-side, which is the Helm command-line tool (helm CLI), and there is also a service side, which is called Tiller.

Helm . Architecture
Image credits: On Slideshare by Codefresh
The helm CLI is what you execute and run in your local command-line environment. It uses a templating engine to generate Kubernetes YAML from some source templates that you set up in Helm. Once the YAML has been generated, it then sends those requests to the Tiller that’s running on your Kubernetes cluster. Tiller then executes updates inside your Kubernetes cluster to make sure it is up to date with what you needed based on the chart, and the tiller will make sure that gets released and will be added to the helm history so that you can rollback to it in the future.

Helm terminologies:

Helm terminologies

Image credits: DigitalOcean

  • Chart: Packaged Kubernetes (k8s) resources (metadata)

  • Values: Parametrize and support multiple environments

  • Chart Repository: Registry of consumable charts, enables to share and reuse configurations

  • Release: A deployed instance of a chart

  • Templates: Templates are Kubernetes manifest files that describe the resources you want to have on the cluster. They help us control operations during deployment. To deploy your applications using helm, you need to package your applications into a chart (directory with some files in a specific structure)

The top-level directory is the name of your chart and, below that, you have chart.yaml, which stores metadata and version information for your chart. There is values.yaml to store default configuration values. requirements.yaml lets you specify dependencies like MongoDB or Postgres, and then there is Charts subdirectory where dependencies and packages are stored. Finally, there is templates directory, this is where we store source templates that are fed into the helm templating engine. Let’s not get into the technical details so we can stick to our topic.

Helm and Kubernetes to help you deploy with ease

The software firms are moving away from a monolithic architectural pattern to the microservices pattern, where simple software units work individually to perform a specific function. Different pieces are loosely copulated and are made to communicate with each other without breaking anything. Adopting to microservices boosts knowledge across different teams to work on a single piece of application with full responsibility.
The microservices are essential; they create ease to manage, update, and scale-up applications individually, unlike monolithic applications. Helm is a game-changer here, it has altered the way developers define, store, and manage the server-side applications. Helm, the package manager, simplifies the management of applications, and the implementation of microservices. Helm wraps the microservices and all the dependencies together.

Helm with Kubernetes is the most popular choice for managing containers on the cloud. The automatic deployment, ease of use, stability, and portability are Kubernetes key features. It includes multiple storage APIs, health check of container, systematic upgrades, and manual or automatic scaling.

Kubernetes solves a lot of problems,

  • Makes sure all your containers are up and running
  • Helps in service discovery
  • Resource isolation and utilization efficiencies
  • Prevent’s vendor lock-in problems
  • Since everything is declarative in YALM, Devs can do Ops as well
  • Kubernetes has big support from the community to help you solve your tech problems

Kubernetes is powerful but… comes with its own complex problems.
Kubernetes can be highly overwhelming and might become complex with all the objects that you need to handle - objects, config maps, services, pods, persistent volumes, and the list goes on. All this becomes too complex when you multiply all these objects with the number of releases that you need to manage. How do you manage all these complex activities? There comes Helm to the rescue.
Helm helps you package all of that complexity into one simple application and what you can configure.

Functions of Helm:

  • Install software
  • Automatically install software dependencies
  • Upgrade software
  • Configure software deployment
  • Fetch packages from repositories

Helm makes it easy to start using Kubernetes with real applications. Kubernetes + Helm duo has become the basic toolset for any DevOps specialist. This guide about Helm charts best practices offers some best practices to structure and specify your Helm charts that will help K8s deliver your container applications smoothly. Helm provides several CI/CD pipeline integration hooks, we can configure actions to occur; for example, before installation begins, or after an upgrade has finished. You can even set health checks for Helm to run and verify a deployment has completed successfully.

Helm helps to optimize Kubernetes deployments with ease. Helm has become a popular tool in the Kubernetes ecosystem, gives all developers a way of building packages (known as charts) of related Kubernetes objects that can be deployed in a cohesive way to a cluster. It also enables parameterizing these packages, so they can be reused in different contexts and deployed to the different environments that the services they provide might be needed in.

Discussion (0)

Editor guide