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
33
votes
2 answers

How to check which gcloud project is active

To see all your gcloud projects you use command gcloud projects list. To switch to a specific project, you use gcloud config set project PROJECT_ID. But what command can you use when you want to check which project is active? By which I mean, on…
Laker
  • 1,622
  • 4
  • 20
  • 32
33
votes
5 answers

Deploying to Cloud Run with a custom service account failed with iam.serviceaccounts.actAs error

I have created a custom service account travisci-deployer@PROJECT_ID.iam.gserviceaccount.com on my project and gave it the Cloud Run Admin role: gcloud projects add-iam-policy-binding "${PROJECT_ID}" \ …
33
votes
4 answers

Why does Google Cloud show an error when using ClusterIP

In my gcloud console it shows the following error for my defined ingresses: Error during sync: error while evaluating the ingress spec: service "monitoring/kube-prometheus" is type "ClusterIP", expected "NodePort" or "LoadBalancer" I am using…
kentor
  • 16,553
  • 20
  • 86
  • 144
33
votes
3 answers

Find out where Google Cloud SDK is installed

I need to add the Google Cloud SDK in the PATH. So I need the path to where is installed. Is there any gcloud ... command which gives me this information? If not I have to go through the symlink in which gcloud, etc. Any cleaner solution for this…
Gabriel Petrovay
  • 20,476
  • 22
  • 97
  • 168
32
votes
3 answers

Using the Google Cloud Platform SDK CLI to List all Active Resources Under a Given Project

Is it possible to list, through the Google Cloud Platform (GCP) SDK CLI (gcloud), all active resources under a given GCP project?
bsam
  • 880
  • 1
  • 8
  • 18
32
votes
5 answers

Get service account auth token without gcloud?

Is it possible to get an authorization bearer token for a Google Cloud service account without the use of gcloud? That is, I would like to make an HTTP request (presumably signed in some way by my JSON key file) that would provide me the equivalent…
Jacob Brown
  • 7,221
  • 4
  • 30
  • 50
31
votes
3 answers

How to include files in .gcloudignore that are ignored in .gitignore

I have certain folders that I ignore in my .gitignore as I do not want it to be published on Github. However, these files are essential for when deploying to Google Cloud (local packages). If I take out .gitignore from .gcloudignore then the files…
WJA
  • 6,676
  • 16
  • 85
  • 152
31
votes
4 answers

Completely Uninstall Google Cloud SDK Mac

I cannot seem to find an uninstall script for the gcloud sdk. I have already removed all the components (except for core which you cannot remove) via gcloud components remove [ID] I noticed that there is a folder google-cloud-sdk located in my user…
Vasseurth
  • 6,354
  • 12
  • 53
  • 81
30
votes
3 answers

Startup script logs location

In Google Cloud Platform's Ubuntu 16.04.1 instance, the output of my startup script was written to /var/log/startupscript.log. Since they upgraded to 16.04.02 I can't find the logs anymore. Any idea?
30
votes
5 answers

Uploading a buffer to google cloud storage

I'm trying to save a Buffer (of a file uploaded from a form) to Google Cloud storage, but it seems like the Google Node SDK only allows files with a given path to be uploaded (Read / Write streams). This is what I have used for AWS (S3) - is the…
Ash
  • 6,483
  • 7
  • 29
  • 37
30
votes
1 answer

How to omit user interaction in gcloud

I want to automatically delete instances in google compute engine. For that I use gcloud gcloud compute instances delete instance-name --zone instance-zone However gcloud asks me to confirm the action. Is it possible to omit this step and do it…
sbeliakov
  • 2,169
  • 1
  • 20
  • 37
30
votes
8 answers

Get fish shell to work with gcloud command line tools?

Has anyone had any luck getting fish shell to work with google's gcloud command line tools? I'm not an expert in Fish script but these are the two files gcloud needs to run (which work fine use Fish's bash mode). Fish doesn't allow you to source…
enemykite
  • 398
  • 1
  • 3
  • 8
29
votes
7 answers

How do I list all IAM users for my Google Cloud Project

I'd like to be able to list all users and service account associated with my projects (preferably using the gcloud CLI tool, but happy to make an API call if needs be). I can easily list all the service accounts associated with a project using this,…
Graham Polley
  • 14,393
  • 4
  • 44
  • 80
28
votes
3 answers

ERROR: (gcloud.compute.ssh) Could not fetch resource: - Insufficient Permission

I am having trouble working through the Compute Engine Quickstart: Build a to-do app with a MongoDB tutorial. (edit: I am running the tutorial from within the compute engine console; i.e.…
Dave Wooldridge
  • 383
  • 1
  • 3
  • 5
28
votes
4 answers

Where does gcloud store its defaults?

Following this Quickstart I set a default project like this $ gcloud config set project lfs258 Updated property [core/project]. $ gcloud config get-value project lfs258 The project lfs258 doesn't exist on my GCP account, though, so I'm surprised…
Dean Schulze
  • 9,633
  • 24
  • 100
  • 165