0PricingLogin
Helm Academy · Lesson

Assigning Template Variables

Capturing values to reuse across a block.

Why Variables Help

When the same value appears many times in a template, capture it once in a variable so you do not repeat the long path everywhere.

The Assignment Syntax

You declare a variable with a dollar name and the colon-equals operator. In Helm, $name holds whatever expression sits on the right.

{{ $name := .Values.appName }}

All lessons in this course

  1. Assigning Template Variables
  2. Preserving the Root Dot Inside range
  3. nindent vs indent in Practice
  4. Debugging Rendered Whitespace
← Back to Helm Academy