gcloud version: Check the SDK Version
gcloud version prints the Cloud SDK core version and the versions of every installed component.
Reproducible pipelines pin the SDK version; this command confirms which one a runner actually has, which matters when a flag or behavior changed between releases.
What it does
gcloud version lists the installed Google Cloud CLI version and each installed component (bq, gsutil, kubectl, and so on) with its version. It is the quickest way to confirm what a runner image shipped.
Common usage
gcloud version
# just the core CLI version for a log or assertion
gcloud version --format='value("Google Cloud SDK")'Flags
| Flag | What it does |
|---|---|
| --format <fmt> | Reshape output, e.g. value("Google Cloud SDK") |
| (no flags) | Print the SDK and all component versions |
In CI
Pin the SDK in your image (a tagged google-cloud-cli image or a fixed apt version) and log gcloud version at the top of the job so a behavior change after an image bump is easy to spot. Newer flags fail on older SDKs, so the version line is the first thing to check when a command that used to work errors out.
Common errors in CI
A command failing with "unrecognized arguments" right after an image update usually means the runner SDK predates that flag; gcloud version confirms the installed release. The format key is the literal string "Google Cloud SDK", so a quoting mistake there yields an empty value rather than an error.