How to fix Error: failed to read values file in Kubernetes
Helm cannot find or read the values YAML file specified with the -f flag.
Quick fix
Fixes Error: failed to read values file
ls -la /path/to/values.yaml
file /path/to/values.yaml- Verify the values file exists
- Use absolute path instead of relative
- Check file permissions
- Validate YAML syntax
ls -la /path/to/values.yamlfile /path/to/values.yamlError: failed to read values file
What this error means
Helm looks for values files at the exact path specified. If the file doesn't exist, is unreadable, or has permissions issues, the operation fails before the chart is even rendered.
Typical symptoms
- helm install/upgrade fails to read values file
- "file not found" or permission error
- Cannot proceed with chart deployment
- Works without -f flag but fails with it
- File exists but Helm cannot access it
- Relative path issues in CI/CD environment
Common causes
- File path is incorrect or typo
- File does not exist at specified path
- File permission issues (not readable)
- Relative path used from wrong directory
- File extension incorrect (e.g., .txt instead of .yaml)
- File deleted or moved after reference
How to fix "Error: failed to read values file"
Check file presence:
ls -la /path/to/values.yaml
file /path/to/values.yamlAlways use full paths in automation:
# Bad
helm install RELEASE CHART -f values.yaml
# Good
helm install RELEASE CHART -f /full/path/to/values.yaml
helm install RELEASE CHART -f "$(pwd)/values.yaml"Ensure file is readable:
chmod 644 values.yaml
ls -l values.yamlOutput should show read permission (r--).
Check if the file is valid YAML:
yaml-lint values.yaml
# Or use Python
python3 -c "import yaml; yaml.safe_load(open('values.yaml'))"Run Helm with validated path:
helm install RELEASE CHART -f $(pwd)/values.yaml -n NAMESPACEOr use --values for multiple files:
helm install RELEASE CHART --values values.yaml --values secrets.yamlAdvanced notes
In CI/CD, always resolve paths to absolute before using. Use environment variables to set paths (helm -f $VALUES_FILE). For sensitive data, use separate values files with restricted permissions. Consider using kube-seal or External Secrets to manage secrets. Test values file parsing with: helm template RELEASE CHART -f values.yaml > manifest.yaml
Frequently asked questions
- What does "Error: failed to read values file" mean?
- Helm looks for values files at the exact path specified. If the file doesn't exist, is unreadable, or has permissions issues, the operation fails before the chart is even rendered.
- How do I fix "Error: failed to read values file"?
- Helm cannot find or read the values YAML file specified with the -f flag.
- What causes "Error: failed to read values file"?
- File path is incorrect or typo File does not exist at specified path File permission issues (not readable)
- Is the "Error: failed to read values file" error serious?
- It is a low-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐Kubernetes Official Documentation
- ๐Helm: helm install(Official Docs)
- ๐Helm: Specifying values(Official Docs)
- ๐Helm: Values Files(Official Docs)