tldr/pages/common/gcloud.md

37 lines
865 B
Markdown
Raw Normal View History

2018-05-28 19:25:10 +01:00
# gcloud
> The official CLI tool for Google Cloud Platform.
2019-06-07 11:58:20 +01:00
> More information: <https://cloud.google.com/sdk/gcloud>.
2018-05-28 19:25:10 +01:00
- List all properties in one's active configuration:
`gcloud config list`
- Log in to Google account:
2019-06-24 23:57:48 +01:00
`gcloud auth login`
2018-05-28 19:25:10 +01:00
- Set the active project:
`gcloud config set project {{project_name}}`
- SSH into a virtual machine instance:
`gcloud compute ssh {{user}}@{{instance}}`
2018-05-28 19:25:10 +01:00
- Display all Google Compute Engine instances in a project. Instances from all zones are listed by default:
`gcloud compute instances list`
- Update a kubeconfig file with the appropriate credentials to point kubectl to a specific cluster in Google Kubernetes Engine:
`gcloud container clusters get-credentials {{cluster_name}}`
- Update all gcloud CLI components:
`gcloud components update`
- Display help for a given command:
2018-05-28 19:25:10 +01:00
`gcloud help {{command}}`