0
0
Kubernetesdevops~10 mins

Chart values and customization in Kubernetes - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Chart values and customization
Start with default Chart
Create values.yaml
Edit values.yaml to customize
Run helm install/upgrade with values
Helm merges values with Chart templates
Kubernetes resources created with custom settings
End
This flow shows how Helm uses a values.yaml file to customize a Chart before deploying Kubernetes resources.
Execution Sample
Kubernetes
helm install myapp ./mychart -f custom-values.yaml
kubectl get pods
helm upgrade myapp ./mychart -f custom-values.yaml
Install and upgrade a Helm Chart using a custom values file to change settings.
Process Table
StepCommand/ActionValues UsedEffectOutput/Result
1helm install myapp ./mychart -f custom-values.yamlcustom-values.yaml overrides defaultsChart templates rendered with custom valuesRelease 'myapp' installed, resources created
2kubectl get podsN/ACheck running podsShows pods with names from 'myapp' release
3helm upgrade myapp ./mychart -f custom-values.yamlcustom-values.yaml overrides defaultsChart templates re-rendered with updated valuesRelease 'myapp' upgraded, resources updated
4kubectl get podsN/AVerify pods after upgradePods reflect updated configuration
5ExitN/AProcess completeCustom values applied successfully
💡 All steps complete; Helm applied custom values to Kubernetes resources
Status Tracker
VariableStartAfter InstallAfter UpgradeFinal
replicaCount3 (default)5 (custom-values.yaml)5 (custom-values.yaml)5
image.tag"1.0.0" (default)"2.1.0" (custom-values.yaml)"2.1.0" (custom-values.yaml)"2.1.0"
service.type"ClusterIP" (default)"LoadBalancer" (custom-values.yaml)"LoadBalancer" (custom-values.yaml)"LoadBalancer"
Key Moments - 3 Insights
Why does Helm use values.yaml instead of changing templates directly?
Helm keeps templates generic and uses values.yaml to customize deployments easily without editing templates. See execution_table step 1 where custom-values.yaml changes settings without touching templates.
What happens if a value is missing in custom-values.yaml?
Helm uses the default value from the Chart's values.yaml. This is why in variable_tracker some variables start with defaults and only change if overridden.
How does Helm apply changes on upgrade?
Helm re-renders templates with updated values and applies changes to Kubernetes resources, shown in execution_table step 3 and 4 where upgrade updates pods.
Visual Quiz - 3 Questions
Test your understanding
Look at the variable_tracker after install. What is the replicaCount value?
A1
B3
C5
D0
💡 Hint
Check the 'After Install' column for replicaCount in variable_tracker
At which step in execution_table does Helm upgrade the release?
AStep 1
BStep 3
CStep 2
DStep 4
💡 Hint
Look for the 'helm upgrade' command in execution_table
If custom-values.yaml did not specify image.tag, what would happen?
AThe default image.tag from Chart is used
BHelm would fail to deploy
CPods would not start
DHelm ignores image.tag completely
💡 Hint
Refer to key_moments about missing values and variable_tracker start values
Concept Snapshot
Helm Charts use values.yaml files to customize deployments.
Custom values override defaults without changing templates.
Use 'helm install -f values.yaml' to apply custom settings.
Upgrades reapply templates with updated values.
Missing values fall back to Chart defaults.
This keeps deployments flexible and reusable.
Full Transcript
This visual execution shows how Helm uses a values.yaml file to customize Kubernetes deployments. First, a Helm Chart has default values. We create a custom-values.yaml file to override some settings like replica count and image tag. When we run 'helm install' with the custom values file, Helm merges these values with the Chart templates and deploys resources accordingly. We verify pods are running with 'kubectl get pods'. Later, we run 'helm upgrade' with the same custom values to update the deployment. Helm re-renders templates with the updated values and applies changes to the cluster. Variables like replicaCount and image.tag change from defaults to custom values, as tracked in the variable tracker. Key moments clarify why values.yaml is used, what happens if values are missing, and how upgrades apply changes. The quiz tests understanding of these steps and variable changes. This process helps keep Helm Charts reusable and easy to customize for different environments.