Install the gdcloud CLI

To install and initialize the Distributed Cloud CLI, download the CLI bundle and complete the following steps.

Add gdcloud CLI bin directory to path

Google recommends adding the gdcloud CLI bin directory to your path.

When the bin directory is added to your path:

  • You won't have to specify the entire directory structure with each command.
  • Crucial gdcloud CLI components are installed in the bin directory that allow commands like gdcloud components to work correctly.

Add the gdcloud CLI bin directory to your path:

  eval 
  
 echo 
  
 'export GDCLOUD_PATH=$(pwd)/google-distributed-cloud-hosted-cli' 
 >> 
~/.bashrc echo 
  
 'export PATH="$GDCLOUD_PATH/bin:$PATH"' 
 >> 
~/.bashrc source 
  
~/.bashrc 

Initialize gdcloud CLI default configuration

Initialize the gdcloud CLI default configuration:

 gdcloud  
init 

Follow the prompted instructions to initialize the configuration. You must provide two properties to complete the initialization:

  • organization_console_url : The URL to your current GDC organization's console. This URL can be global or zonal:
    • For a global console URL, use the syntax https://console. ORG_NAME . SUFFIX , such as https://console.org-1.gdch.google.com .
    • For a zonal console URL, use the syntax https://console. ORG_NAME . ZONE . SUFFIX , such as https://console.org-1.zone-1.gdch.google.com .
  • project : The name of your current GDC project.

View these properties using the gdcloud config list command.

Manage gdcloud CLI components

Components are installable parts of the GDC CLI. The gdcloud CLI is installed by default. List, install, and update gdcloud CLI components as needed.

List components

View the current list of available components:

 gdcloud  
components  
list 

Install components

Install a component on the current version of your gdcloud CLI installation:

 gdcloud  
components  
install  
 COMPONENT_ID 
 

For example, this command installs the kubectl component:

 gdcloud  
components  
install  
kubectl 

Update components

To update all GDC components to the latest version of the gdcloud CLI, see Upgrade to the latest gdcloud CLI .

Create a Mobile Website
View Site in Mobile | Classic
Share by: