How immanuwell/k16s-exam-simulator works
K16S provisions a Kubernetes exam environment, serves timed CKA/CKS sessions in a browser, and grades candidate changes against live cluster state. The main runtime path is candidate → exam UI → API/session handling → per-question setup or validation scripts → Kubernetes state, with progress persisted in SQLite. The README also documents host, Lima-laptop, and lightweight-kind installation modes and browser terminal/desktop access. Provisioning and terminal links follow documented capabilities and tree paths; their implementation details were not sampled.
Main entry points: install.sh Install command · handlers.go Session and grading · main.go HTTP server · exams Exam profiles
Components 20
Environment setup
- Install command
install.sh - Host provisioner
provision - Laptop mode
local - Lightweight mode
lightweight - Kubeadm cluster
Exam content
- Exam profiles
exams - CKA questions
exams/cka - CKS questions
exams/cks - Question setup
exams - Question grading
exams
Exam application
- Question loader
server/questions.go - Exam UI
server/frontend/src/routes/+page.svelte - API client
server/frontend/src/lib/api.js - HTTP server
server/main.go - Session and grading
server/handlers.go - Session progress
server/store.go
Candidate workspace
- Browser terminal
provision/ttyd.sh - Browser desktop
provision/desktop.sh - Web proxy
provision/nginx.sh
Other components
- Candidate
Connections 23
- Candidate → Install command: starts install
- Install command → Host provisioner: provisions host
- Install command → Laptop mode: starts laptop
- Install command → Lightweight mode: starts lightweight
- Host provisioner → Kubeadm cluster: creates cluster
- Laptop mode → Kubeadm cluster: runs provisioner
- Lightweight mode → Kubeadm cluster: runs kind mode
- Candidate → Exam UI: uses exam UI
- Exam UI → API client: calls
- API client → HTTP server: sends requests
- HTTP server → Question loader: loads questions
- Question loader → Exam profiles: reads profiles
- Exam profiles → CKA questions: includes
- Exam profiles → CKS questions: includes
- HTTP server → Session and grading: dispatches routes
- Session and grading → Session progress: reads and writes
- Session and grading → Question setup: runs setup script
- Session and grading → Question grading: runs validator
- Question setup → Kubeadm cluster: changes environment
- Question grading → Kubeadm cluster: checks state
- Candidate → Browser terminal: opens workspace
- Candidate → Browser desktop: opens workspace
- Web proxy → HTTP server: proxies requests