How to add dependency in Helm

Nidhi
3 min readMar 7, 2021

In this blog, we will be deploying this guestbook application using helm and add the Redis as a dependency.

Prerequisite

  1. Kubernetes Cluster Setup
  2. Clone this git repo

Setup a helm project

helm create guestbook
rm -rf guestbook/templates/tests

Adding a Redis Chart dependency

Chart dependencies are used to install other charts’ resources that a Helm chart may depend on.

In this example, we are using Redis as a database so we to need add this as a dependency.

First we can search the charts for redis

helm search hub redis

Now we will add the dependency section in the Charts.yaml file

dependencies:
- name: redis
version: 12.7.x
repository: https://charts.bitnami.com/bitnami

How to download this dependency?

When downloading a dependency for the first time, you should use the helm dependency update command.

This command will download your dependency to the charts/ directory and will generate the Chart.lock file, which specifies metadata about the chart that was downloaded.

helm dependency update guestbook

Now you should see that it has downloaded the dependency and also updated the Chart.lock file

ADDING VALUES TO CONFIGURE THE REDIS CHART

Nidhi

Devops Automation Enginneer