Difference between revisions of "Gcloud"
Jump to navigation
Jump to search
↑ https://cloud.google.com/sdk/docs/install#deb
(58 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{lowercase}} | ||
− | + | == Installation == | |
+ | * MacOS: <code>[[brew install --cask google-cloud-sdk]]</code> | ||
+ | * Ubuntu <ref>https://cloud.google.com/sdk/docs/install#deb</ref>: | ||
+ | <code>[[sudo apt-get install -y]] [[sudo]] [[curl]]</code> | ||
+ | <code>[[sudo apt-get install -y]] [[apt-transport-https]] [[ca-certificates]] [[gnupg]]</code> | ||
+ | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo [[gpg --dearmor]] -o [[/usr/share/keyrings/]]cloud.google.gpg | ||
+ | echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a [[/etc/apt/sources.list.d/google-cloud-sdk.list]] | ||
+ | <code>[[sudo apt-get update]] && sudo [[apt-get install -y google-cloud-sdk]]</code> | ||
+ | |||
+ | == Examples == | ||
[[gcloud init]] | [[gcloud init]] | ||
[[gcloud]] compute instances create | [[gcloud]] compute instances create | ||
[[gcloud config list]] | [[gcloud config list]] | ||
− | + | {{Gcloud auth TOC}} | |
[[gcloud compute images list]] | [[gcloud compute images list]] | ||
+ | [[gcloud compute instances create]] VM_NAME \ | ||
+ | [--image=IMAGE | --image-family=IMAGE_FAMILY] \ | ||
+ | --image-project=IMAGE_PROJECT | ||
+ | --machine-type=MACHINE_TYPE | ||
+ | |||
+ | [[gcloud projects]] | ||
+ | [[gcloud source]] | ||
+ | [[gcloud source repos create]] | ||
+ | [[gcloud -q source repos]] delete | ||
+ | [[gcloud compute]] | ||
+ | [[gcloud iam]] | ||
+ | [[gcloud monitoring]] | ||
+ | |||
+ | * <code>[[gcloud projects get-iam-policy]]</code> | ||
+ | |||
+ | |||
+ | <code>[[gcloud builds submit]]</code> | ||
+ | |||
+ | <code>[[gcloud composer environments create]]</code> | ||
+ | |||
+ | [[gcloud container clusters list]] | ||
+ | [[gcloud container clusters create]] | ||
+ | == Related == | ||
+ | * [[Google Cloud SDK]] | ||
+ | * <code>[[gcloud --help]]</code> | ||
+ | * <code>[[anthoscli]]</code> | ||
+ | * <code>[[gsutil]]</code> | ||
+ | * <code>[[gcloud beta]]</code> | ||
+ | * <code>[[2]]>[[&1]]</code> to redirect [[stderr]] output to [[stdout]] | ||
− | + | == Activities == | |
+ | * https://stackoverflow.com/questions/tagged/gcloud?tab=Votes | ||
== See also == | == See also == | ||
+ | * {{gcloud beta}} | ||
* {{gcloud}} | * {{gcloud}} | ||
− | |||
− | |||
− | |||
[[Category:Google Cloud]] | [[Category:Google Cloud]] |
Latest revision as of 10:59, 8 December 2023
Installation[edit]
- MacOS:
brew install --cask google-cloud-sdk
- Ubuntu [1]:
sudo apt-get install -y sudo curl
sudo apt-get install -y apt-transport-https ca-certificates gnupg
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.listsudo apt-get update && sudo apt-get install -y google-cloud-sdk
Examples[edit]
gcloud init gcloud compute instances create gcloud config list gcloud auth list gcloud auth login gcloud auth application-default login gcloud auth activate-service-account gcloud auth configure-docker gcloud auth print-access-token gcloud auth print-identity-token gcloud auth --help gcloud compute images list gcloud compute instances create VM_NAME \ [--image=IMAGE | --image-family=IMAGE_FAMILY] \ --image-project=IMAGE_PROJECT --machine-type=MACHINE_TYPE
gcloud projects gcloud source gcloud source repos create gcloud -q source repos delete gcloud compute gcloud iam gcloud monitoring
gcloud composer environments create
gcloud container clusters list gcloud container clusters create
Related[edit]
- Google Cloud SDK
gcloud --help
anthoscli
gsutil
gcloud beta
2>&1
to redirect stderr output to stdout
Activities[edit]
See also[edit]
gcloud beta [ monitoring | container ]
gcloud
[config | scheduler | auth | asset | services | gcloud auth login | iam | sql | projects | container
|compute | kms
|source
],gcloud composer environments create
|build
|gcloud config set project
,gcloud source repos create
,gcloud composer environments create
,gcloud version
,gcloud --help
Advertising: