PodSnapshot

When Google Kubernetes Engine (GKE) takes a snapshot of a Pod, it creates a PodSnapshot custom resource that represents the point-in-time state of that Pod. The PodSnapshotPolicy that selects the Pod governs the PodSnapshot. You can't create or update PodSnapshots directly; GKE automatically creates and manages them.

Each PodSnapshot includes status fields that GKE updates during the snapshot operation. You can use these fields to monitor whether the operation succeeded or failed.

For more information, see About GKE Pod snapshots.

PodSnapshot specification

The following code shows the PodSnapshot specification:

spec:
  policyName: string

The following table describes the fields in the PodSnapshot specification:

Fields

spec.policyName

required

string

The name of the PodSnapshotPolicy that governs this snapshot. The policy must be in the same namespace as the snapshot. This field is immutable.

PodSnapshot status

The status section indicates the observed state of the PodSnapshot, including whether the snapshot operation succeeded or failed and where the snapshot data is stored.

The following table describes the fields in the status section:

Fields
status.conditions

array (object)

List of status conditions for the snapshot operation.

status.lastAccessTime

string

The last time that GKE used this snapshot to restore a Pod.

status.observedCheckpointRetryCount

integer

The current retry attempt count for this snapshot operation.

status.observedGeneration

integer

The most recent generation that the controller observed.

status.storageStatus.gcs.observedGCSPath

string

The Cloud Storage path where GKE stores the snapshot data.