In the world of Kubernetes, the 'helm get values' command plays a pivotal role in understanding and managing your charts. It's a crucial tool for any Helm user, enabling you to retrieve and display the current values of a chart. So, let's delve into this command, exploring its syntax, functionality, and practical use cases.

Before we get started, ensure that you have a basic understanding of Helm, a package manager for Kubernetes. If you're new, don't worry; we'll keep our explanation of 'helm get values' novice-friendly, while also providing in-depth details for the veterans.

Understanding the 'helm get values' Command
The 'helm get values' command is designed to fetch and display the values of a chart. It's particularly useful when you want to review or compare the current values of a chart installed on your Kubernetes cluster.

At its core, the command retrieves the values from the 'values.yaml' files in your chart. It can also read values from other sources, such as files specified in the '{{ .Values | include "your-module.getValues" }}' field in your templates.
Basic Syntax

The basic syntax for the 'helm get values' command is:
helm get values [FLAGS] [CHART] [CHART_PATH]
The flags provide additional configuration options, while the chart and chart path are optional. If not specified, the command looks for charts in the current directory.
Here are some commonly used flags:

- -n, --namespace: Specifies the Kubernetes namespace in which to query for the release.
- -o, --output: Sets the output format. Valid options include ' incidc', 'json', and 'yaml'.
Using 'helm get values' with Flags
Flags are an essential aspect of the 'helm get values' command, allowing you to refine your output and control the behavior of the command. Here's how you can use them:

Suppose you have a chart named 'my-chart' installed in your namespace 'my-namespace'. You can retrieve its values like this:
helm get values my-chart -n my-namespace
If you want to see the output in JSON format, you can use:









helm get values my-chart -n my-namespace -o json
'helm get values' in Action: Use Cases
Now that we've explored the syntax and flags of 'helm get values', let's look at some practical use cases.
One common scenario is when you want to check and compare the values of a chart before and after an update. By using 'helm get values', you can easily retrieve the current values and see what changes have been made.
Checking Current Chart Values
Let's say you've installed a chart with some default values, and now you want to check what values are actually being used. You can do this with:
helm get values my-chart
The output will show the current values in key-value pairs, making it easy to review.
Comparing Chart Values
If you've updated your chart with new values but haven't yet installed it, you can compare the old and new values using:
Before update:
helm get values old-chart
After update:
helm get values new-chart
By viewing the outputs side by side, you can see what changes were made in the update.
Lastly, remember that understanding your chart values is key to effective Helm management. Regularly using 'helm get values' helps keep your charts well-organized and up-to-date. Happy Helming!