Manual Checkpoint/Restore
Begin checkpoint/migrate/restoring stateful workloads in Kubernetes in under 5 minutes!
For CPU workloads, no additional configuration is required. With Cedana running on your cluster, you can start by deploying this sample stateful reinforcement learning job (running Stable Baselines 3).
Deploy
# test-pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: cedana-sample-ppo-sb3
labels:
app: cedana-sample-ppo-sb3
spec:
restartPolicy: Never
containers:
- name: cedana-sample-container
image: "cedana/cedana-samples:latest"
command: ["python3", "/app/cpu_smr/rl/ppo_sb3.py"]
resources:
requests:
cpu: "1"
limits:
cpu: "1"Deploy this pod to your cluster using:
Checkpoint
You can either create a heartbeat policy to automatically checkpoint at regular intervals, or you can manually checkpoint this pod on the Pods Page.
Restore
You can manually restore the workload on the Checkpoints Page.
Example
Below you can find an example of this workflow:
If you've made it this far, congratulations! You've successfully used Cedana to move a stateful workload between nodes and have it pick up work where it left off.
Take a look at the left sidebar to see more examples, such as GPU Save/Migrate/Resume on Kubernetes.
Last updated
Was this helpful?