When exploring Kubernetes, it's inevitable to encounter Helm, a package manager for Kubernetes. Helm uses easy-to-understand packaging concepts to help you manage repetitive tasks, ensuring you can use, share, and even modify your applications. You might need to retrieve Helm chart values at some point, and in this guide, we'll delve into the intricacies of doing that with Kubernetes.

But first, let's set the stage. Assume you have already installed and initialized Helm, and you have a chart (a fancy name for a package containing your application) installed. Now, you're ready to look under the hood and understand how your components are configured.

Understanding Helm Chart Values
On a basic level, Helm allows you to manage your application's configuration with a file called values.yaml. This is where you define your application's settings, defaults, and optionally override them during installation. Before we dive into retrieving values, let's understand how these files are structured and where they're located.

The values.yaml file lives in your chart's root directory. A Kubernetes chart follows a specific structure, which you can familiarize yourself with in the official documentation. For now, just know that this file contains key-value pairs, and it's where you specify your application's configuration:
Basic Structure of Values.yaml
![[Kubernetes] Package Manager - Helm 簡介](https://i.pinimg.com/originals/78/15/0e/78150eab0af219181d8513e8f04ee82f.png)
Here's a simple values.yaml code snippet:
```yaml replicaCount: 3 image: repository: nginx tag: stable pullPolicy: IfNotPresent service: name: nginx type: ClusterIP externalPort: 80 internalPort: 80 ```
In this example, you're declaring settings for a deployment and a service. The replicaCount defines the number of pods to run. The image section details the container image to use, and the service section describes the service exposing the deployment.
-label>Diving Deeper into Helm Chart Values

Now that you're comfortable with the basic structure, let's learn how to retrieve these values using Helm. Helm provides a command-line utility for interacting with its components, and you'll use this to explore your chart's values.
Using Helm Get Values
Once your chart is installed, you can use the helm get values command to get an overview of the chart's current values. This command will list all the defined values in your chart. Let's see how to use it:

- First, find the name of your installed release. You can use
helm listto see all your installed releases and their names:
```
NAME NAMESPACE STATUS REVISION UPDATE Kamen 1 day ago 1 ... ...
mynamespacecharts myapp get values command, replace myapp with the name of the release you want to inspect:
```
helm get values myapp
```
You'll see output similar to the earlier values.yaml example, listing all the default values for your app:








```
REPLICAS: 3
IMAGE:
REPOSITORY: nginx
TAG: stable
PULL POLICY: IfNotPresent
SERVICE:
NAME: nginx
TYPE: ClusterIP
EXTERNAL PORT: 80
INTERNAL PORT: 80
```