gcloud sdk

Interacting with google cloud platform services with gcloud cli tool

Google Cloud Platform(GCP) has a command line interface tool for interacting with its underlying API system. It is called gcloud. Documentation and installation instructions can be found here –

You can view the version number –

daniel@hidmo:/tmp$ gcloud version
Google Cloud SDK 263.0.0
beta 2019.05.17
bq 2.0.47
core 2019.09.13
gsutil 4.42
kubectl 2019.08.23

You can create a compute instance by specifying the zonal location, machine type, network, image type and additional parameters such as preemption and enabling serial port.

gcloud compute instances create webserver --zone us-east1-c --can-ip-forward --machine-type=f1-micro --preemptible --metadata=serial-port-enable=1 --network=default --tags=ubuntu --no-address --image-family=ubuntu-1804-lts --image-project=ubuntu-os-cloud --project gcp-project-id

With gcloud version 263 and after, the gcloud help command shows the subcommands layed out by the GCP products and services and a brief description of each subcommand –

Available commands for gcloud:

  AI and Machine Learning
      ai-platform             Manage AI Platform jobs and models.
      ml                      Use Google Cloud machine learning capabilities.
      ml-engine               Manage AI Platform jobs and models.

  API Platform and Ecosystems
      endpoints               Create, enable and manage API services.
      service-management      Create, enable and manage API services.
      services                List, enable and disable APIs and services.

      app                     Manage your App Engine deployments.
      compute                 Create and manipulate Google Compute Engine
      container               Deploy and manage clusters of machines for running
      functions               Manage Google Cloud Functions.

  Data Analytics
      composer                Create and manage Cloud Composer Environments.
      dataflow                Manage Google Cloud Dataflow resources.
      dataproc                Create and manage Google Cloud Dataproc clusters
                              and jobs.
      pubsub                  Manage Cloud Pub/Sub topics, subscriptions, and

      bigtable                Manage your Cloud Bigtable storage.
      datastore               Manage your Cloud Datastore indexes.
      spanner                 Command groups for Cloud Spanner.
      sql                     Create and manage Google Cloud SQL databases.

  Identity and Security
      access-context-manager  Manage Access Context Manager resources.
      auth                    Manage oauth2 credentials for the Google Cloud
      iam                     Manage IAM service accounts and keys.
      kms                     Manage cryptographic keys in the cloud.

  Internet of Things
      iot                     Manage Cloud IoT resources.

  Management Tools
      builds                  Create and manage builds for Google Cloud Build.
      debug                   Commands for interacting with the Cloud Debugger.
      deployment-manager      Manage deployments of cloud resources.
      logging                 Manage Stackdriver Logging.
      organizations           Create and manage Google Cloud Platform
      projects                Create and manage project access policies.

      firebase                Work with Google Firebase.

      dns                     Manage your Cloud DNS managed-zones and
      domains                 Manage domains for your Google Cloud projects.

  SDK Tools
      alpha                   Alpha versions of gcloud commands.
      beta                    Beta versions of gcloud commands.
      components              List, install, update, or remove Google Cloud SDK
      config                  View and edit Cloud SDK properties.
      feedback                Provide feedback to the Google Cloud SDK team.
      help                    Search gcloud help text.
      info                    Display information about the current gcloud
      init                    Initialize or reinitialize gcloud.
      meta                    Cloud meta introspection commands.
      source                  Cloud git repository commands.
      topic                   gcloud supplementary help.
      version                 Print version information for Cloud SDK

      filestore               Create and manipulate Cloud Filestore resources.
      redis                   Manage Cloud Memorystore Redis resources.

References –

Leave a Reply

Your email address will not be published. Required fields are marked *