mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-23 00:51:29 +00:00
Update cheatsheets
This commit is contained in:
42
gcloud
Normal file
42
gcloud
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gcloud
|
||||
|
||||
> The official CLI tool for Google Cloud Platform.
|
||||
> Note: `gcloud` subcommands have their own usage documentation.
|
||||
> More information: <https://cloud.google.com/sdk/gcloud>.
|
||||
|
||||
- List all properties in one's active configuration:
|
||||
|
||||
`gcloud config list`
|
||||
|
||||
- Login to a Google account:
|
||||
|
||||
`gcloud auth login`
|
||||
|
||||
- Set the active project:
|
||||
|
||||
`gcloud config set project {{project_name}}`
|
||||
|
||||
- SSH into a virtual machine instance:
|
||||
|
||||
`gcloud compute ssh {{user}}@{{instance}}`
|
||||
|
||||
- Display all Google Compute Engine instances in a project (by default instances from all zones are listed):
|
||||
|
||||
`gcloud compute instances list`
|
||||
|
||||
- Update a kubeconfig file with the appropriate credentials to point `kubectl` to a specific cluster in Google Kubernetes Engine (GKE):
|
||||
|
||||
`gcloud container clusters get-credentials {{cluster_name}}`
|
||||
|
||||
- Update all `gcloud` components:
|
||||
|
||||
`gcloud components update`
|
||||
|
||||
- Display help for a given command:
|
||||
|
||||
`gcloud help {{command}}`
|
||||
Reference in New Issue
Block a user