Search code examples
google-cloud-datalab

How can i run 'gcloud' and 'gsutil' command at datalab instance?


I've created datalab instance with the latest cli release. However, when I connect to it via gcloud compute ssh command, I cannot run commands like 'gcloud' and 'gsutil'. I'm receiving following message -bash: gcloud: command not found. How can I make it work?


Solution

  • As described in this article by using --image-name flag you can specify the image which you wish to create the Datalab VM instance from. If the flag is not used, the VM will be created using Container-Optimized OS. As mentioned in this article Container-Optimized OS provides a toolbox wrapper to run debugging tools of your choice. For example, you can run the following command series to use gcloud and gsutils tools.

    • first run toolbox
    • then run gcloud or gsutil