What is Google Cloud SDK?

To manage applications and resources on cloud platforms in a secure manner certain tools are used such as Google cloud has Google cloud SDK, Amazon AWS has Amazon web services CLI and so on. These tools enable a secure interface to cloud platforms for managing and monitoring cloud resources. 

Today we look more in detail about Google cloud SDK tool and its features, how it works, use cases and so on. 

Understanding Google Cloud SDK  

Google Cloud SDK is a set of tools for accessing Google cloud platform in a secure manner. It has essential tools for management, maintenance and monitoring Google cloud platform (GCP). It also helps in automation of monotonous and routine tasks to manage cloud infrastructure. Google cloud SDK includes the gsutil, and bq command line tools which can be used to access various Google cloud products and services such as compute engine , cloud storage, BigQuery, and other command line interface (CLI). The gcloud command line tool comes by default with Google cloud SDK. 

Google cloud SDK has emulators for cloud Pub/Sub and cloud data store which enable it to simulate Google cloud services in a local environment for development, testing and validation purposes. 

Characteristics of Google Cloud SDK

Command Line Tool (CLI)

It manages authentication, local configuration, developer workflow, interactions with Google cloud APIs, CLI makes it easy to perform many common cloud tasks such as creating a compute engine VM instance, manage a Kubernetes Engine cluster, and deployment of an App Engine application, 

Client Libraries

There are installable language specific cloud client libraries and google API client libraries. These libraries use supported language natural conventions and style, handles authentication, reduction in amount of boilerplate code and optimization of developer workflow.

Product Specific Command Line Tools   

There are pre-packaged command line tools that come with SDK. Such as gsutil, bq and Kubectl. Gsutil lets you manage cloud storage buckets and objects from CLI. BigQuery allows execution of queries and manipulates data sets. With Kubectl Kubernetes clusters can be managed. 

Cloud Shell

It allows CLI access to cloud resources directly from the browser window. Projects and resources can be managed without having to install cloud SDK. With cloud shell the cloud SDK CLI is always available.

How to Install Google Cloud SDK? 

GCloud SDK runs on all platforms – Windows, Linux (Debian, Ubuntu, RedHat, CentOS), MacOS, and requires Python 2.7.x. 

It is recommended to install the Python bundle that comes along with the installer. Post installation of cloud SDK, open the command line and type ‘gcloud’ to check if SDK is successfully installed or not. 

Download the Cloud SDK installer.

Open a PowerShell terminal and run the following PowerShell commands:

(New-Object Net.WebClient).DownloadFile(“https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe”, “$env:Temp\GoogleCloudSDKInstaller.exe”)

& $env:Temp\GoogleCloudSDKInstaller.exe

Launch the installer and follow the on-screen prompts

The installer installs all required components including Python version 2.7.x 

The installer gives the option to create Start menu and Desktop shortcuts, start cloud SDK shell, and configure Cloud SDK.

Verify installation using below command 

$> gcloud version

This should list the current version of gcloud utility.

Google Cloud SDK 272.0.0

  bq 2.0.50

  core 2019.11.16

  gsutil 4.46

To Install additional component, for e.g., Kubectl

$> gcloud components install Kubectl

To interact with GCP services, we must initialize SDK and set up authentication.

$> gcloud init

Accept login to your Google account.

To continue, you must login. Would you like to log in (Y/n)? Y

Open your browser and prompt for permissions. Log in with your Google account credentials and Allow.

Select the preferred project and zone

gcloud has now been configured!

You can use [gcloud config] to change more gcloud settings.

Your active configuration is: [default]

Leave a Comment

Select your currency
USD United States (US) dollar