Checkpoint and Resume Training Across Pod Restarts
Advanced · 45 minutes · 4 tasks, checked automatically · 100 points
In this advanced MLOps lab you will build a fault-tolerant machine-learning training pipeline on Kubernetes that survives pod restarts by writing periodic checkpoints to a PersistentVolume. You will create the namespace and storage layer, deploy a simulated training Job that writes epoch checkpoints, force a pod interruption, and verify that a resumed Job picks up from the last saved checkpoint rather than restarting from scratch. This pattern is foundational for long-running model training on ephemeral Kubernetes infrastructure.
What you’ll learn
- Provision a PersistentVolumeClaim to store training checkpoints across pod restarts
- Deploy a Kubernetes Job that simulates multi-epoch model training with periodic checkpoint writes
- Demonstrate checkpoint-based resume by deleting the training pod mid-run and verifying the replacement pod continues from the last saved epoch
How this lab works
- Start the lab: One click starts a real Kubernetes cluster on your computer (kind), with kubectl ready in a toolbox terminal.
- Work through 4 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work reads your live cluster and says, task by task, what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Cluster: A real Kubernetes cluster on your computer (kind)
- Kubernetes: 1.34.8
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop installed and running
- A kind cluster created in the Kubernetes Playground
Topics: kubernetes, mlops, checkpointing, persistentvolume, jobs, fault-tolerance, training, resume, storage
Create a free account to start this lab.