Fleet upgrade verification
Answer "against version X, which clusters lag, by how much, and is it the control plane or a node
pool" with a table read from the fleet, not from memory, and "which manifests in our GitOps
repositories declare an API that version X removes" with a scan read from Git. Use it when a user
asks whether an upgrade has reached every cluster, which members are behind a target, how far the
fleet is from a release-channel default, whether one cluster's control plane is current for its
channel (--cluster <location>/<name>), or whether the repositories are ready for a target
version. Run the version report again during a rollout and it also says, per member, what changed
since the previous run and which members have stopped moving (see "Track a rollout across runs" and references/track-a-rollout.md).
With --readiness it also says, per member, what would stop the upgrade: a PodDisruptionBudget
that blocks every node drain, a fail-closed admission webhook with an unreachable backend in the
upgrade's path or able to refuse the control plane's bootstrap RBAC writes (ClusterRoles and
ClusterRoleBindings; Roles and RoleBindings in kube-system and kube-public), a maintenance
exclusion or window, node pools too far below the target, or a blocker one of the per-entry rules
of the upgrade-failure catalogue files, and, as risks that do not block, what those rules name to
watch, a zonal control plane among them (see "Check upgrade readiness"). For upgrade plans,
runbooks and checklists, use the
gke-upgrades skill; it links back here when the question is one these two scripts answer.
"Version skew" here is the gap between a member's versions and the target. It is not
configuration drift: the fleet-consistency audit compares a cluster's configuration against its
live peers, and the drift-detection design (not yet shipped) means live state diverging from Git.
Neither reads versions against a target.
Before you run anything: is this the brief?
A request for the upgrade readiness brief, for which findings need a decision, or for
this week's upgrade readiness report is not answered by this skill's table. Stop here, load the
upgrade-readiness-brief skill (skill_view upgrade-readiness-brief) and follow it: it reads the
Saturday review's copy under /opt/data/upgrade-readiness/weekly/ and the findings queue, and
answers in the brief's shape, which opens with Decide now and the undecided critical findings'
queue ids. Run this skill's report only when that skill tells you to (no weekly review exists yet),
or when the question is the readiness table itself ("is every cluster ready", "what would stop the
upgrade", "which clusters lag").
Run the report
/opt/data/profiles/platform/skills/fleet-upgrade-verification/scripts/fleet_upgrade_report.py \
<collector_args from the fleet_scope tool, verbatim, or nothing on an install that declares no scope> \
[--project <project>]... [--cluster <location>/<name>... | --rollout-in-progress] [--target-version <version>] \
[--readiness [--at <RFC 3339>] [--kubeconfig-dir <dir>]] \
--output /opt/data/scratch/fleet_versions_$(date +%s)_$$.json
The script lives under the profile home, /opt/data/profiles/platform (/opt/data/profiles/platform/skills/fleet-upgrade-verification/scripts/fleet_upgrade_report.py).
--cluster is repeatable and, when given, restricts the report to those clusters, as
<location>/<name> or a bare name and in no other form: each half is a GKE name, lowercase
letters, digits and hyphens, so an empty half (/prod, prod/), whitespace or an uppercase
letter is a usage error (exit 2), not a bare name and not a miss. Every other member of the projects is
skipped, reads included, and the rollout record is neither read nor written, since a narrowed
read would file every member it did not name as gone. A spec that matches no cluster in the
projects is an error line and exit 1, not an empty table, and when a project's listing failed
the line says so rather than claiming no match; one cluster named in both forms is one request,
not a hit and a miss. --rollout-in-progress beside --cluster is a usage error (exit 2): the
flag speaks to the rollout record, which a narrowed run does not touch. The JSON
names the specs under narrowed_to, so a reader can tell the narrowed members[] from the
fleet; the deprecation scan refuses such a file. The fleet-audit collector passes the clusters
it found behind, and reads back only a report marked as narrowed to that cluster.
--project is repeatable and, when given, is the whole scope; on an install with a declared scope each one must be a
project the fleet_scope tool lists and the collector_args must be passed beside it, or the script refuses. Otherwise --scope-projects, passed once as one
comma-separated list, is the whole scope: the install's declared scope as the platform_control fleet_scope
tool reports it. Call that tool first and paste its collector_args, which spells each flag once
(declared: false means the fallback that follows). --scope-unread sets no scope: it names the declared
projects the install could not read, recorded as a coverage gap, and alone it means a declared scope with
nothing readable, which the script reports instead of enumerating. Without --project or a declared scope the script
takes the union of GCP_PROJECT_ID, GKE_PROJECT_ID and PROJECT_ID with MONITORED_PROJECT_IDS
(comma- or whitespace-separated) when set, otherwise with every project visible to gcloud projects list
plus gcloud's configured project when it is unset or blank.
--target-version sets one target for every member, in the MAJOR.MINOR.PATCH-gke.BUILD form
the fleet reports (1.31.4-gke.1183000); the -gke.BUILD suffix is optional and reads as build
0 without it. Without the flag, each member is measured against its own release channel's
defaultVersion from gcloud container get-server-config, fetched once per project and
location, and the target column says which baseline was used, for example
1.31.4-gke.1183000 channel default (REGULAR).
--output writes the same data as JSON: members[], errors[], a summary count per
status, narrowed_to (the --cluster specs of a narrowed run, null on a full one) and, on a
full run only, the rollout block and the per-member progress fields references/track-a-rollout.md describes. A
--cluster run writes neither, since it neither reads nor compares the record; it prints a
note where the progress section would be.
The file is written whole (a temp file, then a rename) at the end of the run, so a reader never
meets a partial document and a run that dies leaves the path as it found it. /opt/data/scratch
is shared by every card, so an output name you choose carries a timestamp and the shell's PID, as
the block above does; read back the path the script prints on its Wrote … to line.
The weekly audit's collector is the exception: it moves its own per-run file onto the fixed name
described below.
--rollout-in-progress belongs to rollout tracking, below, and --state-dir to its record
(references/track-a-rollout.md); --readiness, --at and --kubeconfig-dir to the
readiness check, below that.
The script runs gcloud container clusters list, gcloud container get-server-config and, when neither
--project nor a declared scope is passed, gcloud config get-value project and gcloud projects list (plus gcloud projects describe for a
project whose clusters list was refused as API-disabled or whose configured identifier is a
project number), each with a 60-second timeout, and
with --readiness three gcloud list reads per project (compute backend-services list,
compute instances list, container operations list, each projected to the fields the per-entry
rules read), one gcloud container clusters get-credentials and the kubectl gets per
member that "Check upgrade readiness" lists (the PDB rule's, the webhook rule's, then one paged
read per kind the per-entry rules read), plus whatever a registered rule reads through the
script's own runner under the same cap (the audit-log rule's paged gcloud logging reads).
It changes nothing in GCP or in any cluster; the only things it writes are its own record under
/opt/data/state/fleet-upgrade-verification/, the per-member kubeconfig files --readiness
needs, and the --output file. A failed or timed-out gcloud read, get-credentials, PDB read,
webhook read or audit-log read is listed under the table and sets exit code 1; the other projects,
locations and members are still reported. The kubectl gets after the webhook read are recorded
per kind in the member's note and JSON and set no exit code (see "Check upgrade readiness"), so
exit 0 says the version table, the PDB rule and the webhook rule were read on every member, not
that every later read was. A project whose own Kubernetes
Engine API is off holds no cluster and is not a failed read; a refusal naming another project,
such as a quota project, is one. The weekly upgrade audit's collector also runs the script, with
--readiness --cluster <location>/<name>, once per behind cluster: that run writes
upgrade-readiness_<project>_<location>_<name>.json under /opt/data/scratch/, and a --cluster run
neither reads nor writes the rollout record, so the record above is untouched by it.
Reading get-server-config by hand
Prefer the script, even for one cluster: the command above with --cluster <location>/<name>
added (and the collector_args, as always) answers "is this control plane current for its
channel?" against the right field. Read the control-plane column for that question: a member's
status also folds in its node pools. If you do read gcloud container get-server-config
yourself, read it at the cluster's location (--location, --project). Each entry of
channels[] carries up to three versions, and only one of them is the channel's current version:
defaultVersion is the version the channel offers now, what a new cluster on it gets. A cluster
is behind its channel when its currentMasterVersion is below this, and the lag in minors is
measured against it.
upgradeTargetVersion, where present, is the version GKE's automatic upgrades currently move
clusters on the channel to, and it can trail defaultVersion by a minor: on 2026-10-16 REGULAR's
was 1.35.8-gke.1439001 while its default was 1.36.4-gke.1391002. It is not the channel's
current version, so a cluster at or above it can still be a minor behind defaultVersion.
validVersions is what the channel currently offers. A running version absent from it can still
be served (GKE keeps patching a version a channel has promoted past), so its absence does not
mean unsupported.
So "at the automatic-upgrade version" and "current" are different answers. Report the cluster's
version, the channel's defaultVersion, and the gap in minors between them.
Read the table
One row per cluster: project, cluster, location, channel, control-plane version, the lowest
node-pool version with its pool name, target, gap in minors, status, note.
The gap is the target's minor minus the minor of the member's lowest component (control plane or
lowest pool): positive when behind, 0 on the same minor, negative when the lowest component is
ahead. It is empty when the major version differs from the target, and the note says so.
lagging: the control plane or at least one node pool is a minor or more below the target, or
on a different major.
patch-behind: everything is on the target's minor, but the control plane or a pool has a
lower patch or gke build. A new patch reaches a channel default before any rollout wave has
applied it, so a fleet is routinely patch-behind the morning after; report it, and keep it
apart from lagging.
current: control plane and every pool equal the target.
ahead: newer than the target somewhere and nothing below it. Reported, never flagged; channel
rollout waves are staged, so a member ahead of its channel default is routine. The gap is 0
when one component is at the target and the other ahead, negative when both are ahead.
unknown: the control-plane version did not parse, no node pool's version parsed (or the
cluster record has no node pools), the cluster has no release channel and no
--target-version was given, get-server-config failed for the location, or the channel is
not in that location's server config. The note names which.
A pool whose version does not parse is skipped and named in the note; the row is still graded on
the pools that do parse. A note reading upgrade in flight means the cluster or a pool is
RECONCILING or PROVISIONING; report that row as in progress rather than as a stall.
Track a rollout across runs
Every full run compares itself with the previous run for the same target and prints a "Rollout
progress" section saying, per member, what started, completed or stalled since then. Pass
--rollout-in-progress when the user says a rollout is under way; when there is no earlier record
to compare with and the user asks which members have stalled, run the report twice in the turn
with the flag and read the second run's section. What each progress value means, the record
file and the JSON: references/track-a-rollout.md.
Check upgrade readiness
--readiness adds a readiness table after the version table, one row per member, graded against
the same target as the member's version row, and a readiness object per member in the JSON
(members[].readiness, with a top-level readiness block holding the instant evaluated and a
count per verdict), then the add-on inventory table (members[].readiness.addons in the JSON, the
known-issues rule's input). Without the flag nothing changes. The rules below each name the governance
SOP check they derive from, except the webhook rule, which has no SOP check yet; after them run
the per-entry rules registered in upgrade_readiness.EXTRA_RULES (scripts/readiness_rules/, one
module per rule, each stamped with the entry of the upgrade-failure catalogue in the repository's
design docs it reads (an entry can have several); the package
docstring is the contract a module meets); the maintenance rule departs from its SOP where the two
differ, and says so. Run it once, from this profile, for every cluster the question covers; a
readiness question fanned out to the Cluster Agents loses the maintenance read and the grading
below, and a hand survey in their place reports every fail-closed webhook without a visible
backend, GKE's own URL-backed ones included, as a blocker.