This post will show you how to perform helm upgrade, how to update chart values with helm command examples. Helm provide the features to upgrade helm charts easily.
DevOps Full Course Tutorial for Beginners - DevOps Free Training Online
Docker Full Course Tutorial for Beginners - Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners - Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners - Ansible Free Training Online
Openstack Full Course Tutorial for Beginners - Openstack Free Training Online
Understanding Helm Upgrade Command
Helm command provide an option callled 'upgrade' that will help us to upgrade charts values. This helm upgrade command will also create new helm release revision.
Syntax:
Use the Helm Upgrade command like below.
helm upgrade [RELEASE] [CHART] [flags]
Where,
[RELEASE]
is the release name of the application that you wanted to upgrade.[CHART]
is the helm chart name that you wanted to upgrade.[flags]
are additional flags that you wanted to provide along with helm upgrade command.
Upgrading Chart Values
In order to upgrade helm chart values, we first need to create resource file like values.yaml and we have to define the new values like below.
Step 1: Create values.yaml file.
image:
repository: nginx
tag: 1.21.1
replicaCount: 3
service:
type: LoadBalancer
port: 80
Step 2: Define new values in values.yaml file.
Let's say, you want to update the image tag. In that case, just change it the new value as follows in the file.
image:
repository: nginx
tag: 1.22.1
replicaCount: 3
service:
type: LoadBalancer
port: 80
Step 3: Run Helm Upgrade command.
helm upgrade myapp ./mychart --set-file values.yaml
Above helm upgrade command upgrade the helm chart with new values. Where, myapp
is the release name of the application and mychart
is the helm chart name.
Additionally, --set-file
flag instructs Helm command to use the values.yaml file to updrade the helm chart values.
That's it for this post. Keep practicing and have fun. Leave your comments if any.
Related Searches and Questions asked:
0 Comments