Schema Validation with values.schema.json
Rejecting invalid values before rendering.
Schema Validation with values.schema.json is a free DevOps Bootcamp lesson on CoddyKit. This is lesson 4 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, and your progress syncs across the web and the CoddyKit app. The DevOps Bootcamp course includes 4 lessons in total.
Guard Your Values
Users can pass any values into your chart. A values.schema.json file lets you reject bad input before a single template renders. 🚧
It Is JSON Schema
The file follows the standard JSON Schema format. You describe the shape, types, and required fields your values must have.
Where It Lives
Place values.schema.json in the chart's root, right beside values.yaml. Helm picks it up automatically with no extra flags.
A Minimal Schema
Every schema starts with a type of object and a properties block describing each value your chart accepts.
{
"type": "object",
"properties": {}
}Typing a Field
Inside properties you declare each field's type, such as integer for a replica count, so a string would be rejected.
"replicaCount": { "type": "integer" }Marking Fields Required
The required array lists fields that must be present. Omit one and Helm refuses to render the chart.
"required": ["image"]Constraining Values
You can add bounds like minimum so a replicaCount below one is caught immediately as invalid.
"replicaCount": { "type": "integer", "minimum": 1 }Restricting to a Set
Use enum to allow only specific strings, such as a service type of ClusterIP, NodePort, or LoadBalancer.
"type": { "enum": ["ClusterIP", "NodePort"] }When Validation Runs
Helm validates against the schema during install, upgrade, template, and lint, so bad values are blocked everywhere.
Clear Failure Messages
When values break the schema, Helm stops and prints exactly which field is invalid, making fixes quick and obvious.
Error: values don't meet the specifications of the schema(s)Why It Matters
A schema turns silent misconfigurations into loud, early errors, protecting users of your chart from surprises in production.
Quick Check
You want a chart to reject an install when the image value is missing. What do you use?
Recap
You learned that values.schema.json validates user input with JSON Schema, using type, required, minimum, and enum to block bad values early. 🎉
Learn DevOps Bootcamp with an AI tutor — free
Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.
- Courses
- 142
- Lessons
- 568
Frequently Asked Questions
Is the “Schema Validation with values.schema.json” lesson free?
Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Schema Validation with values.schema.json”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The DevOps Bootcamp course includes 4 lessons in total.
What will I learn in “Schema Validation with values.schema.json”?
Rejecting invalid values before rendering. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start DevOps Bootcamp?
No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 4 of 4.
How long does the “Schema Validation with values.schema.json” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this DevOps Bootcamp lesson?
Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Static Checks with helm lint
- Verifying Output with helm template
- Writing helm test Cases
- Schema Validation with values.schema.json