In the realm of Kubernetes, understanding and manipulating values for ConfigMaps or Secrets is a fundamental task. The `helm get values` command is a powerful tool for achieving this. Let's delve into how you can use it to retrieve values from a Helm chart, along with example use cases.

To get started, ensure you have Helm installed and initialized with a Kubernetes cluster. Also, make sure you have the desired chart installed in your namespace.

Basic Usage and Examples
The basic syntax for `helm get values` is as follows:

helm get values
Replace

Displaying Values
The command above will display the current values used by the chart. Here's an example using the stable/redis chart:
helm get values redis --namespace my-namespace

You'll see output similar to this:
Using Specific Keys
You can also fetch values using specific keys. Here's how:

helm get values
For instance, to get only the 'Battery' value from the redis chart:








helm get values redis Battery --namespace my-namespace
The output will be:
Comparing Values with Defaults
Sometimes, you might want to see how the used values differ from the default ones. The `helm get values` command can do this too.
Values and Defaults Side by Side
Use `helm get values --show-downloads` to display both the used and default values side by side like this:
helm get values redis --show-downloads --namespace my-namespace
The output will show both the current values and the ones the chart uses by default.
Values and Defaults in a Detailed Format
For a more detailed view, use the following command:
helm get values redis --all --output yaml --namespace my-namespace
This command will output the values in a detailed, YAML format, showing both the current and default values.
Understanding how to Retrieving values with `helm get values` is crucial for your day-to-day work with Helm. From displaying current values to comparing them with defaults, these examples illustrate the versatility of the command. Start incorporating them into your DevOps workflow today!