LinuxCommandLibrary

gcloud-components

TLDR

View available components for installation

$ gcloud components list
copy

Install one or more components (installs any dependencies as well)
$ gcloud components install [component_id1 component_id2 ...]
copy

Update all components to the latest version
$ gcloud components update
copy

Update all components to a specific version
$ gcloud components update --version=[1.2.3]
copy

Update components without confirmation (useful for automation scripts)
$ gcloud components update --quiet
copy

SYNOPSIS

gcloud components <COMMAND> [GCLOUD-WIDE-FLAG …]

COMMAND: install | list | remove | update | version

PARAMETERS

install
    Install one or more named components (e.g., kubectl, docker-credential-gcr).

list
    Display installed components with versions, sizes, and status; supports --filter and --format.

remove
    Uninstall specified components.

update
    Upgrade all components to latest versions; optional --version for specific.

version
    Show detailed status of all installed components.

DESCRIPTION

The gcloud components command manages the modular tools within the Google Cloud SDK, enabling users to install, update, list, or remove components like gcloud, gsutil, bq, kubectl, and others. These components provide CLI access to Google Cloud services such as Compute Engine, Cloud Storage, BigQuery, and Kubernetes Engine.

Installation pulls binaries from Google's repositories, ensuring version compatibility and security updates. The update subcommand keeps all components current, while list shows versions and paths. This modularity allows customizing the SDK footprint, ideal for developers, DevOps, and sysadmins working in cloud environments.

Usage typically follows SDK installation via official scripts, with components residing in ~/.gcloud or specified install paths. It supports filtering lists and specific version installs, streamlining workflows for multi-project setups.

CAVEATS

Requires internet for install/update; install in user directory (not root). Some components platform-specific.

COMMON EXAMPLES

gcloud components install kubectl bq
gcloud components list
gcloud components update

GLOBAL FLAGS

--help: Show help.
--version: Display gcloud version.
--quiet, -q: Disable prompts.

HISTORY

Introduced in 2013 with initial Google Cloud SDK release; evolved for modular management as SDK grew to 100+ components by 2023.

SEE ALSO

gcloud(1)

Copied to clipboard