Google cloud gcloud: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
Line 13: Line 13:
=== --project ===
=== --project ===
The google cloud platform project name to use for this invocation. If  omitted, then the current project is assumed; the current project can be listed using `gcloud config list --format='text(core.project)'` and can be set using `gcloud config set project PROJECTID`. Overrides the default core/project property value for this command invocation.
The google cloud platform project name to use for this invocation. If  omitted, then the current project is assumed; the current project can be listed using `gcloud config list --format='text(core.project)'` and can be set using `gcloud config set project PROJECTID`. Overrides the default core/project property value for this command invocation.
프로젝트를 설정한다.
<pre>
<pre>
--project=PROJECT_ID
--project=PROJECT_ID

Revision as of 12:56, 30 January 2019

Overview

gcloud 내용 정리.

gcloud wide flags

gcloud 전역에서 사용되는 flag 정리.

--account

Google cloud platform user account to use for invocation. Overrides the default core/account property value for this command invocation.

--account=ACCOUNT

--project

The google cloud platform project name to use for this invocation. If omitted, then the current project is assumed; the current project can be listed using `gcloud config list --format='text(core.project)'` and can be set using `gcloud config set project PROJECTID`. Overrides the default core/project property value for this command invocation.

프로젝트를 설정한다.

--project=PROJECT_ID

compute

Create and manipulate google compute engine resources.

gcloud compute GROUP | COMMAND [GCLOUD_WIDE_FLAG ...]

compute instances

Read and manipulate Google Compute Engine virtual machine instances

gcloud compute instances GROUP | COMMAND [GCLOUD_WIDE_FLAG ...]

list

설정된 모든 compute engine instance 를 보여준다.

List google compute engine instances. Displays all google compute engine instances in a project.

By default, instances from all zones are listed. The results can be narrowed down using a filter: --filter="zone:(Zone ...)".

gcloud compute instances list [NAME ...] [--regexp=REGEXP, -r REGEXP]
        [--zones=ZONE,[ZONE,...]] [--filter=EXPRESSION] [--limit=LIMIT]
        [--page-size=PAGE_SIZE] [--sort-by=[FIELD,...]] [--uri]
        [GCLOUD_WIDE_FLAG ...]
Example
$ gcloud compute instances list --project smiling-axiom-219521
NAME           ZONE            MACHINE_TYPE  PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP    STATUS
test-instance  europe-west4-a  g1-small                   10.164.0.2   35.204.231.99  RUNNING

See also