Creating Courses
Quizzes
Quizzes assess learner comprehension at the end of a section. Each quiz lives in its own directory with a quiz.yml file.
quiz.yml Example
A complete quiz file with all supported fields:
type: quiz
id: "kubernetes-basics-quiz"
title: "Kubernetes Basics Quiz"
description: "Test your understanding of Kubernetes fundamentals."
passingScore: 70
allowRetakes: true
shuffleQuestions: false
timeLimit: 15
questions:
- id: "q1"
type: single_choice
question: "What is the smallest deployable unit in Kubernetes?"
explanation: "A Pod is the smallest and simplest Kubernetes object. It represents one or more containers that share storage, networking, and a specification for how to run the containers."
points: 10
options:
- id: "a"
text: "Container"
isCorrect: false
- id: "b"
text: "Pod"
isCorrect: true
- id: "c"
text: "Deployment"
isCorrect: false
- id: "d"
text: "Service"
isCorrect: false
- id: "q2"
type: multiple_choice
question: "Which of the following are valid Kubernetes workload types? (Select all that apply)"
explanation: "Deployments, StatefulSets, and DaemonSets are all valid Kubernetes workload types. 'Container' is not a workload type — it runs inside a Pod."
points: 15
options:
- id: "a"
text: "Deployment"
isCorrect: true
- id: "b"
text: "StatefulSet"
isCorrect: true
- id: "c"
text: "Container"
isCorrect: false
- id: "d"
text: "DaemonSet"
isCorrect: true
- id: "q3"
type: single_choice
question: "True or False: Kubernetes Pods can contain multiple containers."
explanation: "True. Pods are designed to support co-located, co-managed helper programs, such as logging and monitoring agents."
points: 5
options:
- id: "a"
text: "True"
isCorrect: true
- id: "b"
text: "False"
isCorrect: false
passMessage: "Great work! You have a solid understanding of Kubernetes basics."
failMessage: "Review the Kubernetes fundamentals lessons and try again."
reviewResources:
- title: "Kubernetes Fundamentals Lesson"
url: "/courses/kubernetes-fundamentals/lessons/what-is-kubernetes"Question Types
Each question requires a type field. Two types are supported:
| Type | Description |
|---|---|
single_choice | Only one correct answer. Used for standard multiple-choice and true/false questions. |
multiple_choice | Multiple correct answers. Learners must select all correct options. |
Flat Structure Requirement
All fields must be at the top level of the YAML file. The CLI validates against a flat structure — do not nest fields under a quiz: key.
Incorrect — nested structure
type: quiz
title: "Kubernetes Quiz"
quiz:
id: "kubernetes-basics-quiz"
passingScore: 70
questions:
- ...Correct — flat structure
type: quiz
id: "kubernetes-basics-quiz"
title: "Kubernetes Quiz"
passingScore: 70
questions:
- ...Pass/Fail Configuration
These fields control how the platform evaluates quiz completion and what learners see after submitting:
| Field | Default | Description |
|---|---|---|
passingScore | 70 | Percentage (0–100) required to pass. |
allowRetakes | true | Whether learners can retake failed quizzes. |
shuffleQuestions | false | Randomize question order on each attempt. |
timeLimit | null | Time limit in minutes. Omit for no limit. |
passMessage | — | Message displayed on passing. |
failMessage | — | Message displayed on failing. |
reviewResources | [] | Links shown after a failed attempt. |
