Here’s how display the Service Account of a particular instance in Google Cloud.
gcloud compute instances describe server-name \
--zone us-central1-c \
--project project-id \
If you already have Google SDK installed, you can activate GCloud Interactive Shell, which is still in beta by the way, by typing the following command from the Google SDK terminal.
The interactive shell environment has auto-completion. It shows you who’s logged in and which project you are currently set in. To exit the interactive shell, just Press F9 to quit.
Here’s the Google Cloud Platform (GCP) GCloud command to list all disks in a specific project.
gcloud compute disks list --project yourprojectname
How to upgrade Google SDK on Redhat, Fedora and Centos Linux.
If you are having trouble running that command because the GCloud component manager is disabled, you can try the following commands which will achieve the same result as above.
sudo yum makecache && sudo yum update \
Here’s how to add a firewall rule in Google Cloud Platform CLI
gcloud compute firewall-rules create "firewall-name" \
--priority "1000" \
--direction INGRESS \
--action allow \
--network "network-name" \
Describe firewall rule.
gcloud compute firewall-rules describe firewall-name
Delete firewall rule.
gcloud compute firewall-rules delete firewall-name