helm
software installation
charts
version control
tutorial

How to install a specific Chart version

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

When working with Kubernetes, Helm is an essential tool that helps in managing packages of pre-configured Kubernetes resources, known as charts. Helm charts facilitate easy deployment and management of even the most complex applications running in Kubernetes. However, there may be scenarios where specific versioning of a Helm chart is required, either to ensure compatibility with your application or to leverage particular features or updates. Below is a detailed guide on how to install a specific Helm chart version.

Prerequisites

Before installing a specific Helm chart version, ensure you have the following:

  • Helm installed: Refer to the official Helm documentation for installation instructions tailored to your operating system.
  • Kubernetes cluster: A functioning Kubernetes cluster with kubectl access credentials configured.
  • Set up Helm repository: Add the Helm repository where your desired chart resides using helm repo add.

Steps to Install a Specific Helm Chart Version

  1. Identify the Helm Chart Version
    The first step is to identify the specific version of the chart you wish to install. Use the following Helm command to list available versions of a specific chart:
bash
   helm search repo <repository-name>/<chart-name> --versions

Example:

bash
   helm search repo bitnami/nginx --versions

This command will list all available versions of the chart along with a brief description.

  1. Install a Specific Chart Version
    Once you have identified the correct version, use the following command to install it:
bash
   helm install <release-name> <repository-name>/<chart-name> --version <chart-version>

Example:

bash
   helm install my-nginx bitnami/nginx --version 9.3.0

In this command:

  • <release-name> is a custom name you give to your Helm release.
  • <repository-name> is the name of your Helm repository.
  • <chart-name> is the specific chart you want to install.
  • <chart-version> specifies the version of the chart you are installing.
  1. Verify Installation
    To ensure your chart has been installed correctly, use the following command:
bash
   helm list

This will display a list of your active chart releases. Verify the REVISION and STATUS to ensure the correct version is deployed and running.

Additional Details

Rolling Back to a Previous Version

If at any point you need to revert to a previously installed version of a chart, Helm provides a rollback feature. Execute the following command, specifying the release name and revision number:

bash
helm rollback <release-name> <revision-number>

Example:

bash
helm rollback my-nginx 1

Helm Versioning Format

Helm uses semantic versioning (major.minor.patch) to manage chart versions. Understanding this versioning system can assist in assessing what changes might have been introduced in a particular release. For example:

  • Major Version: Increases reflect incompatible API changes.
  • Minor Version: Added functionality in a backwards-compatible manner.
  • Patch Version: Backward-compatible bug fixes.

Upgrading an Installed Chart

To upgrade to a different version of an already installed chart, use:

bash
helm upgrade <release-name> <repository-name>/<chart-name> --version <new-chart-version>

Example:

bash
helm upgrade my-nginx bitnami/nginx --version 9.4.0

Summary Table

StepCommand/Action
List available chart versionshelm search repo <repository-name>/<chart-name> --versions
Install a specific chart versionhelm install <release-name> <repository-name>/<chart-name> --version <chart-version>
Verify installationhelm list
Rollback to a previous versionhelm rollback <release-name> <revision-number>
Upgrade Chart Versionhelm upgrade <release-name> <repository-name>/<chart-name> --version <new-chart-version>

Conclusion

Installing a specific version of a Helm chart can be critical for ensuring compatibility and stability in your applications running on Kubernetes. By following these detailed steps, you can easily manage and control the versions of the applications you deploy, ensuring that they meet the specific needs and requirements of your environment. Helm's semantic versioning, rollback capabilities, and easy upgrade paths make it a powerful tool for Kubernetes package management.


Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.