How to fix Error: failed to read values file in Kubernetes

KubernetesBEGINNERLOWUpdated Dec 6, 2025ยท 126 views

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
  1. Verify the values file exists
  2. Use absolute path instead of relative
  3. Check file permissions
  4. Validate YAML syntax
kubernetes โ€” error
ls -la /path/to/values.yaml
file /path/to/values.yaml
Error: 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

  1. File path is incorrect or typo
  2. File does not exist at specified path
  3. File permission issues (not readable)
  4. Relative path used from wrong directory
  5. File extension incorrect (e.g., .txt instead of .yaml)
  6. File deleted or moved after reference

How to fix "Error: failed to read values file"

1Verify the values file exists

Check file presence:

bash
ls -la /path/to/values.yaml
file /path/to/values.yaml
2Use absolute path instead of relative

Always use full paths in automation:

bash
# 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"
3Check file permissions

Ensure file is readable:

bash
chmod 644 values.yaml
ls -l values.yaml

Output should show read permission (r--).

4Validate YAML syntax

Check if the file is valid YAML:

bash
yaml-lint values.yaml
# Or use Python
python3 -c "import yaml; yaml.safe_load(open('values.yaml'))"
5Use correct file path in Helm command

Run Helm with validated path:

bash
helm install RELEASE CHART -f $(pwd)/values.yaml -n NAMESPACE

Or use --values for multiple files:

bash
helm install RELEASE CHART --values values.yaml --values secrets.yaml

Advanced 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