k8wiz
Helm
Medium
Troubleshooting

helm template fails at <.Values.database.primary.host> with nil pointer evaluating interface {}.primary. Which key is missing from the values?

Select your answer:

Show answer and explanation

Answer: database

Explanation

Reading a missing key returns nothing, and the failure comes when the template tries to read the next field from that nothing. The message names that next field, primary, so the missing key is the one before it, database. A default in values.yaml or a with block around the access fixes it.

Read more about Helm