Questions tagged [gcloud]

gcloud is the main command line tool of Google Cloud SDK, which allows you to manage resources on Google Cloud Platform and perform various developer workflow tasks.

gcloud is the main command line tool of Google Cloud SDK, which allows you to manage resources on Google Cloud Platform and perform various developer workflow tasks. Cloud SDK also contains tools and libraries to create and manage App Engine, Compute Engine, Cloud Storage, Cloud SQL, and BigQuery resources.

Useful links

Google Cloud SDK - Home page Google Cloud SDK - Discussions Forum gcloud - Tool Guide gcloud - Support channel at freenode IRC network

4396 questions
60
votes
24 answers

ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]

I kept getting kicked out of my compute engine instance after a few seconds of idle with the indicated error (255). I used 'gcloud compute ssh' to log in. I am using the default firewall setting, which I believe would be good enough for ssh. But if…
Anh Nguyen
  • 655
  • 1
  • 5
  • 5
53
votes
5 answers

How to get the active authenticated gcloud account?

Using gcloud auth ... you can add or remove accounts used during the gcloud commands. Is there a way to get the active account without grep-ing and awk-ing? gcloud auth list is good for humans but not good enough to a machine. I want a cleaner…
Gabriel Petrovay
  • 20,476
  • 22
  • 97
  • 168
52
votes
7 answers

Upload files to Firebase Storage using Node.js

I'm trying to understand how to upload files in Firebase Storage, using Node.js. My first try was to use the Firebase library: "use strict"; var firebase = require('firebase'); var config = { apiKey: "AIz...kBY", authDomain:…
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
51
votes
4 answers

How to stop gcloud container engine clusters

I use gcloud to provision kubernetes clusters, and use container engine to do so. Aside from the production cluster, I would like to create short-lived clusters, for testing etc'. Instead of recreating clusters, I would like to have a test cluster…
pazams
  • 969
  • 1
  • 8
  • 10
46
votes
6 answers

gcloud preview app deploy process takes ~8 minutes, is this normal?

Trying out new flexible app engine runtime. In this case a custom Ruby on Rails runtime based on the google provided ruby runtime. When firing of gcloud preview app deploy the whole process takes ~8 minutes, most of which is "updating service". Is…
43
votes
12 answers

-bash: gcloud: command not found on Mac

I'm following the Quickstart for Mac OS X to install the cloud SDK. Following the steps exactly, 1) python -V returns "Python 2.7.10" 2) Download and extract using ./install.sh the 64bit version of the SDK in google-cloud-sdk returns... Welcome to…
Shane O'Seasnain
  • 3,534
  • 5
  • 24
  • 31
43
votes
2 answers

How to use multiple service accounts with gcloud?

I have two Google Cloud service accounts; one for each of my two projects. # ACCOUNTS editor@someproj-1.iam.gserviceaccount.com editor@someproj-2.iam.gserviceaccount.com I can tell gcloud which account I need to use before executing a…
fredrik
  • 9,631
  • 16
  • 72
  • 132
40
votes
5 answers

Is there any way to use gcloud with python3?

I have a little confused about gcloud with python3 After I installed gcloud in python3 env and I tried to example Quickstart for Python in the App Engine Flexible Environment. It said 'You need Google Cloud SDK', so I installed SDK. All the process…
piper
  • 501
  • 1
  • 4
  • 4
37
votes
3 answers

gcloud compute execute command remotely

Currently, if I want to execute something on a VM, I copy files over like this: gcloud compute --project copy-files --zone /home/roman/source/dir roman@:/some/path Then I need to SSH into it manually like…
Roman
  • 8,826
  • 10
  • 63
  • 103
35
votes
1 answer

Can I automate Google Cloud SDK gcloud init - interactive command

Documentation on Google Cloud SDK https://cloud.google.com/sdk/docs/ directs one to run gcloud init after installing it. Is there a way to automate this step given that gcloud init is an interactive command?
cherba
  • 8,681
  • 3
  • 27
  • 34
35
votes
7 answers

`gcloud compute copy-files`: permission denied when copying files

I'm having a hard time copying files over to my Google Compute Engine. I am using an Ubuntu server on Google Compute Engine. I'm doing this from my OS X terminal and I am already authorized using gcloud. local:$ gcloud compute copy-files…
bryan
  • 8,879
  • 18
  • 83
  • 166
34
votes
4 answers

How to remove warning in kubectl with gcp auth plugin?

When I run any kubectl command I get following WARNING: W0517 14:33:54.147340 46871 gcp.go:120] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead. To learn more, consult…
Alexander Meise
  • 1,328
  • 2
  • 15
  • 31
34
votes
4 answers

Kubernetes assign pods to pool

is there a way to tell kubectl that my pods should only deployed on a certain instance pool? For example: nodeSelector: pool: poolname Assumed i created already my pool with something like: gcloud container node-pools create poolname…
PlagTag
  • 6,107
  • 6
  • 36
  • 48
34
votes
1 answer

Google Cloud Platform: Logging in to GCP from commandline

I was sure it will be simple but couldn't find any documentation or resolution. I'm trying to write a script using gcloud to perform some operations in my GCP instances. Is there anyway to login/authenticate using gcloud via command line…
Lior Ohana
  • 3,467
  • 4
  • 34
  • 49
34
votes
6 answers

Access google container registry without the gcloud client

I have a CoreOS docker host that I want to start running containers on, but when trying to use the docker command to fetch the image from the google container private registry (https://cloud.google.com/tools/container-registry/), I get a 403. I did…
Andre
  • 790
  • 2
  • 9
  • 23