Managing Cloud SDK components

Components are the installable parts of the Cloud SDK. A component can be a command-line tool (gcloud, bq and gsutil), a set of gcloud tool commands at the Alpha or Beta release levels, or a package that contains dependencies used by a tool in the Cloud SDK.

The most commonly-used components are installed by default. If you run a gcloud alpha or gcloud beta command interactively and the alpha or beta component is not installed, the gcloud tool asks you whether you want to install it. An affirmative response installs the component and then runs the command. Other components are installed on-demand by the gcloud tool when you run commands that require them.

Try it for yourself

If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.

Get started for free

Default components

When you install the Cloud SDK, the following components are installed by default:

ID Name Description
gcloud Default gcloud tool commands Tool for interacting with Google Cloud. Only commands at the General Availability and Preview release levels are installed with this component. You must separately install the gcloud alpha Commands and/or gcloud beta Commands components if you want to use commands at other release levels.
bq BigQuery command-line tool Tool for working with data in BigQuery
gsutil Cloud Storage command-line tool Tool for performing tasks related to Cloud Storage.
core Cloud SDK core libraries Libraries used internally by the Cloud SDK tools.

Alpha and beta components

The Cloud SDK provides two components that contain gcloud tool alpha and beta commands. These components aren't installed by default, but you can install them manually at any time after the initial Cloud SDK installation. These components are:

ID Name Description
alpha gcloud tool alpha commands gcloud tool commands at the alpha release level.
beta gcloud tool beta commands gcloud tool commands at the beta release level.

gcloud tool commands at the General Availability release level are part of the gcloud tool component and are installed automatically when you install the Cloud SDK.

A list of all available additional components and external package managers (not installed by default) is available below.

Managing Cloud SDK components

You can list, install, update, and remove Cloud SDK components to suit your needs.

Listing components

To see a list of components that are available and currently installed, run gcloud components list:

gcloud components list

The following sample isn't a complete listing of all available components. To view the latest component offerings, update your Cloud SDK installation and then run gcloud components list.

│                                                  Components                                         │
│     Status   │                         Name                   │            ID           │    Size   │
│ Installed     │ App Engine Go Extensions                      │ app-engine-go            │  97.7 MiB │
│ Not Installed │ AppCtl                                        │ appctl                   │  21.0 MiB │
│ Installed     │ Cloud Bigtable Command Line Tool              │ cbt                      │   4.0 MiB │
│ Installed     │ Cloud Bigtable Emulator                       │ bigtable                 │   3.8 MiB │
│ Installed     │ Cloud Datalab Command Line Tool               │ datalab                  │   < 1 MiB │
│ Installed     │ Cloud Datastore Emulator                      │ cloud-datastore-emulator │  17.8 MiB │
| Not Installed | Cloud Datastore Emulator                      | cloud-firestore-emulator | 60.4 MiB  |
│ Installed     │ Cloud Pub/Sub Emulator                        │ pubsub-emulator          │  33.2 MiB │
│ Installed     │ Cloud SQL Proxy                               │ cloud-sql-proxy          │   7.6 MiB │
│ Installed     │ Cloud Spanner Emulator                        │ cloud-spanner-emulator   │  21.8 MiB │
│ Installed     │ Google Cloud Build Local Builder              │ cloud-build-local        │   4.4 MiB │
│ Installed     │ gcloud app Java Extensions                    │ app-engine-java          │ 118.9 MiB │
│ Installed     │ gcloud app PHP Extensions                     │ app-engine-php           │  21.9 MiB │
│ Installed     │ gcloud app Python Extensions (Extra Libraries)│ app-engine-python-extras │  27.8 MiB │
│ Installed     │ kubectl                                       │ kubectl                  │  12.2 MiB │
│ Installed     │ Cloud BigQuery Command Line Tool              │ bq                       │   < 1 MiB │
│ Installed     │ Cloud SDK Core Libraries                      │ core                     │   7.2 MiB │
│ Installed     │ Cloud Storage Command Line Tool               │ gsutil                   │   3.3 MiB │
│ Installed     │ gcloud Alpha Commands                         │ alpha                    │   < 1 MiB │
│ Installed     │ gcloud Beta Commands                          │ beta                     │   < 1 MiB │
│ Installed     │ gcloud app Python Extensions                  │ app-engine-python        │   6.1 MiB │

Installing components

To install a component at the current version of your Cloud SDK installation, run gcloud components install:

gcloud components install [COMPONENT-ID]

The gcloud tool installs the specified component.

For example, if you want to install the kubectl command:

gcloud components install kubectl

Updating components

Use the gcloud components update command to update all installed components to the latest available version of Cloud SDK:

gcloud components update

If you have an older version of Cloud SDK installed, the gcloud tool updates all the installed components.

If you'd need to revert to a previously known good version, and installed the Cloud SDK directly (outside of a package manager, including using the interactive installer, static versions, Windows installer, or Homebrew), you can use gcloud components update to revert to the specified version:

gcloud components update --version VERSION

For downgrading versions of Cloud SDK installed using a package manager, refer to these instructions for specifying versions when downloading using apt-get or yum.

Removing components

Use the gcloud components remove command to remove a specified component by its ID:

gcloud components remove [COMPONENT-ID]

You can re-install a component using the gcloud components install command at any time.

Additional components

Additional components that contain dependencies for gcloud tool commands are also available in the Cloud SDK, but aren't installed by default. For an exhaustive list of components, run $ gcloud components list. Additional components that can be installed are marked with the status Not Installed.

External package managers

If you installed the Cloud SDK through the apt or yum package managers, you can also install additional Cloud SDK components using those same package managers. If your package manager cannot find these packages, read the installing with apt or installing with yum guides to learn how to configure as a package source.

Cloud SDK Component APT Package YUM Package
app-engine-go google-cloud-sdk-app-engine-go google-cloud-sdk-app-engine-go
app-engine-java google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-java
app-engine-python google-cloud-sdk-app-engine-python google-cloud-sdk-app-engine-python
bigtable google-cloud-sdk-bigtable-emulator google-cloud-sdk-bigtable-emulator
cbt google-cloud-sdk-cbt google-cloud-sdk-cbt
cloud-build-local google-cloud-sdk-cloud-build-local google-cloud-sdk-cloud-build-local
datalab google-cloud-sdk-datalab google-cloud-sdk-datalab
docker-credential-gcr Not yet available. Not yet available.
gcd-emulator google-cloud-sdk-datastore-emulator google-cloud-sdk-datastore-emulator
kubectl kubectl kubectl
pubsub-emulator google-cloud-sdk-pubsub-emulator google-cloud-sdk-pubsub-emulator