LinuxCommandLibrary

gcloud-components-install

Install or update Google Cloud SDK 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

Check the current version of Google Cloud CLI
$ gcloud version
copy

Update Google Cloud CLI to the latest version
$ gcloud components update
copy

SYNOPSIS

gcloud components install COMPONENT_ID... [--quiet] [GLOBAL_FLAG...]

PARAMETERS

COMPONENT_ID...
    The unique identifier(s) of the Google Cloud SDK component(s) to install. Multiple IDs can be provided, separated by spaces. Use `gcloud components list` to see available components.

--quiet, -q
    Suppress interactive prompts and assume 'yes' to all questions during installation. This is particularly useful for scripting and automation.

DESCRIPTION

The `gcloud components install` command is a core utility within the Google Cloud SDK, designed for managing its modular components. Although sometimes referred to informally as `gcloud-components-install` due to its function, the standard and documented command-line invocation is `gcloud components install`. This command enables users to extend the functionality of their Google Cloud SDK by installing optional software components, such as kubectl for Kubernetes management, App Engine SDKs for specific programming languages, or various tool sets for Google Cloud services like BigQuery and Dataflow.

It automates the download, verification, and integration of these components, ensuring they are compatible with the installed SDK version and providing a streamlined experience for tailoring the SDK to specific development and operational needs. It is crucial for accessing tools not included in the default SDK installation.

CAVEATS

  • Requires an active internet connection to download components from Google Cloud servers.
  • Requires sufficient free disk space to accommodate the new components.
  • Depending on the SDK installation path and user permissions, elevated privileges (e.g., `sudo`) might be required to perform the installation.
  • Components are installed for and must be compatible with the currently active Google Cloud SDK version.
  • Some components may have their own system dependencies that need to be met.

COMMON COMPONENTS

Some frequently installed Google Cloud SDK components include:

  • kubectl: The command-line tool for controlling Kubernetes clusters.
  • app-engine-java, app-engine-python, app-engine-go, app-engine-php, app-engine-standard: SDKs for developing Google App Engine applications in various programming languages and environments.
  • beta: Provides access to beta-level commands and features within the `gcloud` CLI.
  • alpha: Provides access to alpha-level commands and features within the `gcloud` CLI.
  • cloud-datastore-emulator: An emulator for testing Google Cloud Datastore applications locally.
  • gsutil: A Python-based command-line tool for interacting with Cloud Storage. (Often included by default but can be reinstalled).
  • bq: The command-line tool for BigQuery. (Often included by default).

USAGE EXAMPLE

To install the kubectl and beta components, you would run:

`gcloud components install kubectl beta`

To install kubectl without any interactive prompts:

`gcloud components install kubectl --quiet`

HISTORY

The Google Cloud SDK and its component management system evolved alongside the rapid growth of Google Cloud Platform. Initially, installing additional tools might have involved separate downloads or manual setup processes. The `gcloud components` command family was introduced to streamline the management of these tools, providing a centralized and consistent interface for installing, updating, and removing SDK components.

This modular approach allows users to customize their SDK installation, only downloading and maintaining the tools they actively use, making the SDK more efficient and user-friendly by reducing unnecessary disk space usage and potential software conflicts. The `install` subcommand is a core part of this modularity, ensuring developers can easily extend their CLI capabilities to match their specific development and operational requirements.

SEE ALSO

gcloud(1), gcloud components list(1), gcloud components update(1), gcloud components remove(1)

Copied to clipboard