In simple terms, the Google Cloud SDK (Software Development Kit) is a set of tools for managing resources and applications hosted on the Google Cloud Platform. It is made up of command-line tools such as cloud, gsutil, and bq. With the Cloud SDK, the cloud tool is downloaded automatically.
Cloud SDK includes language-specific Cloud Client Libraries that can be installed. These libraries take advantage of the styles and natural conventions of each supported language, eliminate boilerplate code, manage authentication and improve developer workflow.
The bq tool allows you to use the command line to manipulate datasets, run queries, set tables, and entities in BigQuery.
The gsutil command-line tool gives you direct access to Cloud Storage which includes a variety of object and bucket management tasks.
The kubectl tool gives you more command over your Kubernetes clusters. You can use kubectl to deploy apps, manage and inspect cluster resources, and view logs, among other things.
Emulators for Cloud Datastore, Bigtables, Firestore, Spanner, and Pub/Sub are included in the Cloud SDK for local testing, development, and validation.
Cloud Shell permits you to access your cloud resources via a command line directly from your browser. Without the requirement of installing the Google Cloud SDK or other tools on your system, you can easily manage your projects and resources. When you use Cloud Shell, the Cloud SDK gcloud command-line tool, as well as other utilities are always available, and fully authorized and updated.
That’s all about Google CloudSDK. Now, let’s start its installation guide on Ubuntu 20.04. Firstly, ensure that you are using the terminal as a ‘superuser’.
Installing Google CloudSDK on Ubuntu 20.04
Step 1: Open the terminal by pressing ‘CTRL+ALT+T’ or search it manually in the activities and update the packages list.
$ sudo apt update
Step 2: Write-out these commands for installing the essential packages for Google CloudSDK installation.
$ sudo apt install apt-transport-https ca-certificates gnupg
Step 3: Utilize the curl command to get the google cloud SDK package and add the GPG key.
$ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
$ echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
Step 4: Finally you can install the Google CloudSDK tool.
$ sudo apt install google-cloud-sdk
Step 5: Now, it is the time to initialize the Google Cloud.
$ sudo gcloud init
Step 6: Configure your account settings.
Step 7: Use the following command to prevent browser-based authorization.
$ gcloud init --console-only
In the first section of the article, we have discussed what Google CloudSDK is and its features. In the next section, we have shown you a complete step-by-step procedure of Google CloudSDK installation on your Ubuntu 20.04 system.