GCloud Interactive Shell

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.

gcloud beta interactive

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.

Google SDK Update

How to upgrade Google SDK on Redhat, Fedora and Centos Linux.

gcloud components update

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 \
kubectl \
google-cloud-sdk \
google-cloud-sdk-app-engine-grpc \
google-cloud-sdk-pubsub-emulator \
google-cloud-sdk-app-engine-go \
google-cloud-sdk-cloud-build-local \
google-cloud-sdk-datastore-emulator \
google-cloud-sdk-app-engine-python \
google-cloud-sdk-cbt \
google-cloud-sdk-bigtable-emulator \
google-cloud-sdk-datalab \

GCP CLI Create Firewall

Here’s how to add a firewall rule in Google Cloud Platform CLI

gcloud compute firewall-rules create "firewall-name" \
--description="firewall-description" \
--priority "1000" \
--direction INGRESS \
--action allow \
--network "network-name" \
--target-service-accounts="service@account.net" \
--source-ranges="" \
--rules tcp:9001

Describe firewall rule.

gcloud compute firewall-rules describe firewall-name

Delete firewall rule.

gcloud compute firewall-rules delete firewall-name