diff --git a/pages/common/gcloud-app.md b/pages/common/gcloud-app.md new file mode 100644 index 000000000..53901ed02 --- /dev/null +++ b/pages/common/gcloud-app.md @@ -0,0 +1,25 @@ +# gcloud app + +> Build scalable applications on a managed serverless platform. +> See also: `gcloud`. +> More information: . + +- Deploy an app's code and configuration to the App Engine server: + +`gcloud app deploy {{deployables}}` + +- List all versions of all services deployed to the App Engine server: + +`gcloud app versions list` + +- Open the current app in a web browser: + +`gcloud app browse` + +- Create an App Engine app within the current project: + +`gcloud app create` + +- Display the latest App Engine app logs: + +`gcloud app logs read` diff --git a/pages/common/gcloud-auth.md b/pages/common/gcloud-auth.md new file mode 100644 index 000000000..9fe6f7231 --- /dev/null +++ b/pages/common/gcloud-auth.md @@ -0,0 +1,29 @@ +# gcloud auth + +> Grant and revoke authorization to `gcloud` and manage credentials. +> See also: `gcloud`. +> More information: . + +- Authorize Google Cloud access for the `gcloud` CLI with Google Cloud user credentials and set the current account as active: + +`gcloud auth login` + +- Authorize Google Cloud access similar to `gcloud auth login` but with service account credentials: + +`gcloud auth activate-service-account` + +- Manage Application Default Credentials (ADC) for Cloud Client Libraries: + +`gcloud auth application-default` + +- Display a list of Google Cloud accounts currently authenticated on your system: + +`gcloud auth list` + +- Display the current account's access token: + +`gcloud auth print-access-token` + +- Remove access credentials for an account: + +`gcloud auth revoke` diff --git a/pages/common/gcloud-compute.md b/pages/common/gcloud-compute.md new file mode 100644 index 000000000..d2f677399 --- /dev/null +++ b/pages/common/gcloud-compute.md @@ -0,0 +1,37 @@ +# gcloud compute + +> Create, run, and manage VMs on Google Cloud infrastructure. +> See also: `gcloud`. +> More information: . + +- List Compute Engine zones: + +`gcloud compute zones list` + +- Create a VM instance: + +`gcloud compute instances create {{instance_name}}` + +- Display a VM instance's details: + +`gcloud compute instances describe {{instance_name}}` + +- List all VM instances in a project: + +`gcloud compute instances list` + +- Create a snapshot of a persistent disk: + +`gcloud compute disks snapshot {{disk_name}} --snapshot-names {{snapshot_name}}` + +- Display a snapshot's details: + +`gcloud compute snapshots describe {{snapshot_name}}` + +- Delete a snapshot: + +`gcloud compute snapshots delete {{snapshot_name}}` + +- Connect to a VM instance using SSH: + +`gcloud compute ssh {{instance_name}}` diff --git a/pages/common/gcloud-config.md b/pages/common/gcloud-config.md new file mode 100644 index 000000000..88db7ab05 --- /dev/null +++ b/pages/common/gcloud-config.md @@ -0,0 +1,29 @@ +# gcloud config + +> Manage different configurations of `gcloud`. +> See also: `gcloud`. +> More information: . + +- Define a property (like compute/zone) for the current configuration: + +`gcloud config set {{property}} {{value}}` + +- Fetch the value of a `gcloud` property: + +`gcloud config get {{property}}` + +- Display all the properties for the current configuration: + +`gcloud config list` + +- Create a new configuration with a given name: + +`gcloud config configurations create {{configuration_name}}` + +- Display a list of all available configurations: + +`gcloud config configurations list` + +- Switch to an existing configuration with a given name: + +`gcloud config configurations activate {{configuration_name}}` diff --git a/pages/common/gcloud-container.md b/pages/common/gcloud-container.md new file mode 100644 index 000000000..313001dee --- /dev/null +++ b/pages/common/gcloud-container.md @@ -0,0 +1,25 @@ +# gcloud container + +> Manage containerized applications on Kubernetes and clusters. +> See also: `gcloud`. +> More information: . + +- Register `gcloud` as a Docker credential helper: + +`gcloud auth configure-docker` + +- Create a cluster to run GKE containers: + +`gcloud container clusters create {{cluster_name}}` + +- List clusters for running GKE containers: + +`gcloud container clusters list` + +- Update kubeconfig to get `kubectl` to use a GKE cluster: + +`gcloud container clusters get-credentials {{cluster_name}}` + +- List tag and digest metadata for a container image: + +`gcloud container images list-tags {{image}}` diff --git a/pages/common/gcloud-feedback.md b/pages/common/gcloud-feedback.md new file mode 100644 index 000000000..60c17c1c8 --- /dev/null +++ b/pages/common/gcloud-feedback.md @@ -0,0 +1,13 @@ +# gcloud feedback + +> Provide feedback to the Google Cloud team. +> See also: `gcloud`. +> More information: . + +- Provide feedback to the `gcloud` team: + +`gcloud feedback` + +- Provide feedback to the `gcloud` team and attach a log file: + +`gcloud feedback --log-file {{log_file}}` diff --git a/pages/common/gcloud-help.md b/pages/common/gcloud-help.md new file mode 100644 index 000000000..7e9e449ce --- /dev/null +++ b/pages/common/gcloud-help.md @@ -0,0 +1,9 @@ +# gcloud help + +> Display help and reference information for `gcloud`. +> For supplementary help for topics not directly associated with individual commands, see also `tldr gcloud topic`. +> More information: . + +- Search the `gcloud` CLI reference documents for specific terms: + +`gcloud help` diff --git a/pages/common/gcloud-iam.md b/pages/common/gcloud-iam.md new file mode 100644 index 000000000..3d8c339ec --- /dev/null +++ b/pages/common/gcloud-iam.md @@ -0,0 +1,29 @@ +# gcloud iam + +> Configure Identity and Access Management (IAM) preferences and service accounts. +> See also: `gcloud`. +> More information: . + +- List IAM grantable roles for a resource: + +`gcloud iam list-grantable-roles {{resource}}` + +- Create a custom role for a organization or project: + +`gcloud iam roles create {{role_name}} --{{organization|project}} {{organization|project_id}} --file {{path/to/role.yaml}}` + +- Create a service account for a project: + +`gcloud iam service-accounts create {{name}}` + +- Add an IAM policy binding to a service account: + +`gcloud iam service-accounts add-iam-policy-binding {{service_account_email}} --member {{member}} --role {{role}}` + +- Replace existing IAM policy binding: + +`gcloud iam service-accounts set-iam-policy {{service_account_email}} {{policy_file}}` + +- List a service account's keys: + +`gcloud iam service-accounts keys list --iam-account {{service_account_email}}` diff --git a/pages/common/gcloud-projects.md b/pages/common/gcloud-projects.md new file mode 100644 index 000000000..e734dfb55 --- /dev/null +++ b/pages/common/gcloud-projects.md @@ -0,0 +1,25 @@ +# gcloud projects + +> Manage project access policies in Google Cloud. +> See also: `gcloud`. +> More information: . + +- Create a new project: + +`gcloud projects create {{project_id|project_number}}` + +- List all active projects: + +`gcloud projects list` + +- Display metadata for a project: + +`gcloud projects describe {{project_id}}` + +- Delete a project: + +`gcloud projects delete {{project_id|project_number}}` + +- Add an IAM policy binding to a specified project: + +`gcloud projects add-iam-policy-binding {{project_id}} --member {{principal}} --role {{role}}` diff --git a/pages/common/gcloud-topic.md b/pages/common/gcloud-topic.md new file mode 100644 index 000000000..8a5a93ebc --- /dev/null +++ b/pages/common/gcloud-topic.md @@ -0,0 +1,13 @@ +# gcloud topic + +> Provides supplementary help for topics not directly associated with individual commands. See also `gcloud`. +> For general help, see `tldr gcloud help`. +> More information: . + +- View supplementary help material for non-command topics like accessibility, filtering, and formatting: + +`gcloud topic {{topic_name}}` + +- List all available topics: + +`gcloud topic --help` diff --git a/pages/common/gcloud.md b/pages/common/gcloud.md index fce0eb819..e6910aec8 100644 --- a/pages/common/gcloud.md +++ b/pages/common/gcloud.md @@ -1,13 +1,14 @@ # gcloud > The official CLI tool for Google Cloud Platform. +> Note: `gcloud` subcommands have their own usage documentation. > More information: . - List all properties in one's active configuration: `gcloud config list` -- Log in to Google account: +- Login to a Google account: `gcloud auth login` @@ -19,15 +20,15 @@ `gcloud compute ssh {{user}}@{{instance}}` -- Display all Google Compute Engine instances in a project. Instances from all zones are listed by default: +- 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: +- 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 CLI components: +- Update all `gcloud` components: `gcloud components update`