Changes

m
no edit summary
Line 3: Line 3:  
== Kubelet Checkpoint API ==
 
== Kubelet Checkpoint API ==
   −
This functionality is exposed through a node-local kubelet [https://kubernetes.io/docs/reference/node/kubelet-checkpoint-api/ checkpoint API] (enabled by default in Kubernetes v1.30) that allows you to create a snapshot of a running container.
+
This functionality is exposed through a node-local kubelet [https://kubernetes.io/docs/reference/node/kubelet-checkpoint-api/ checkpoint API] (enabled by default in Kubernetes v1.30). A checkpoint can be triggered by sending an HTTP POST Request to the kubelet as follows:
 +
 
 +
<pre>
 +
curl -X POST "https://localhost:10250/checkpoint/<Namespace>/<Pod>/<Container>"
 +
</pre>
 +
 
 +
=== Example ===
 +
 
 +
1. Create a Pod
 +
 
 +
<pre>
 +
cat > pod.yaml <<EOF
 +
apiVersion: v1
 +
kind: Pod
 +
metadata:
 +
  name: counters
 +
spec:
 +
  containers:
 +
    - name: counter
 +
      image: busybox:latest
 +
      command: ['sh', '-c', 'i=0; while true; do echo $i; i=$((i+1)); sleep 1; done']
 +
EOF
 +
</pre>
 +
 
 +
<pre>
 +
kubectl apply -f pod.yaml
 +
</pre>
 +
 
 +
2. Create a container checkpoint
 +
 
 +
<pre>
 +
curl -X POST "https://localhost:10250/checkpoint/default/counters/counter"
 +
</pre>
509

edits