GKE Pod snapshots are configured with two custom resource definitions (CRDs):
When snapshots are taken, the Pod state is represented by a PodSnapshot resource. Each resource includes status fields that update when snapshots are taken, which helps monitor operation success or failure.
To learn more about Pod snapshots, see About Pod snapshots .
PodSnapshotStorageConfig specification
PodSnapshotStorageConfig defines where Pod snapshots are stored.
spec
:
snapshotStorageConfig
:
gcs
:
bucket
:
string
path
:
string
| Fields | |
|---|---|
| required |
Defines the configuration for the snapshot's underlying storage. |
| required |
Contains the configuration for Cloud Storage setups. |
| required |
Defines the bucket name to be used for storing Pod snapshots. |
| optional |
Defines the path within the bucket to be used as a child directory for storing Pod snapshots. |
Status
The status
section indicates the observed state of the PodSnapshotStorageConfig
resource.
| Fields | |
|---|---|
status.conditions
|
List of status conditions for the storage configuration. |
status.observedGeneration
|
The most recent generation observed by the controller. |
PodSnapshotPolicy specification
PodSnapshotPolicy configures the Pod snapshot feature, such as the matching conditions to trigger checkpoints for selected workloads.
spec
:
selector
:
matchExpressions
:
-
key
:
string
operator
:
string
values
:
[]
string
matchLabels
:
additionalProperties
:
string
storageConfigName
:
string
triggerConfig
:
postCheckpoint
:
string
type
:
string
spec.selector
required
object
Defines the set of Pods managed by this policy. The policy's checkpoint and restore settings will apply to all Pods that match the policy's label selector.
spec.selector.matchExpressions
optional
[]object
A list of label selector requirements. The requirements are combined by using an AND statement.
spec.selector.matchExpressions[].key
required
string
The label key that the selector applies to.
spec.selector.matchExpressions[].operator
required
string
Represents a key's relationship to a set of values. Valid operators are In
, NotIn
, Exists
, and DoesNotExist
.
spec.selector.matchExpressions[].values
optional
[]string
An array of string values. If the operator is In
or NotIn
, the values array must be non-empty. If the operator is Exists
or DoesNotExist
, the values array must be empty.
spec.selector.matchLabels
optional
object
A map of key-value pairs. A single key-value pair in the map is equivalent to an element of matchExpressions
, whose key field is "key", the operator is In
, and the values array contains only "value". The requirements are combined by using an AND statement.
spec.storageConfigName
required
string
Name of the PodSnapshotStorageConfig this policy depends on.
spec.triggerConfig
required
object
Configuration for checkpoint triggers.
spec.triggerConfig.postCheckpoint
optional
string
Defines Pod behavior after a checkpoint is taken. stop
: the Pod turns to completed status. resume
: the workload resumes after being checkpointed. Default is resume
.
spec.triggerConfig.type
required
string
Type of checkpoint trigger. The following values are supported:
-
workload: triggered by the application inside the Pod signaling to the GKE agent. -
manual: triggered by the creation of aPodSnapshotManualTriggercustom resource.
Status
The status
section indicates the observed state of the PodSnapshotPolicy
resource.
| Fields | |
|---|---|
status.conditions
|
List of status conditions for the snapshot policy. |
status.observedGeneration
|
The most recent generation observed by the controller. |
PodSnapshotManualTrigger specification
PodSnapshotManualTrigger
signals when to take a snapshot of a specified Pod.
spec
:
targetPod
:
string
| Fields | |
|---|---|
| required |
Name of the Pod to take a snapshot of. |
Status
The status
section indicates the state of the manual trigger operation.
| Fields | |
|---|---|
status.conditions
|
List of status conditions for the manual trigger, such as whether the checkpoint was successful. |
status.observedGeneration
|
The most recent generation observed by the controller. |
status.snapshotCreated
|
The name of the |
PodSnapshot specification
PodSnapshot represents a point-in-time snapshot of a Pod's state. It is governed by the PodSnapshotPolicy.
spec
:
policyName
:
string
| Fields | |
|---|---|
| required |
The name of the PodSnapshotPolicy in the same namespace that governs the behavior of this snapshot. This field is immutable. |
Status
The status
section indicates whether a snapshot operation succeeded or failed
and provides metadata about the snapshot.
| Fields | |
|---|---|
status.conditions
|
List of status conditions for the snapshot operation. |
status.lastAccessTime
|
The last time this snapshot was used to restore a Pod. |
status.observedCheckpointRetryCount
|
The current retry attempt count for this snapshotting operation. |
status.observedGeneration
|
The most recent generation observed by the controller. |
status.storageStatus.gcs.observedGCSPath
|
The Cloud Storage path where the snapshot data resides. |

