Google cloud gcloud: Difference between revisions
(Created page with "== Overview == gcloud 내용 정리. == gcloud wide flags == gcloud 전역에서 사용되는 flag 정리. === --account === Google cloud platform user account to use for in...") |
|||
(3 intermediate revisions by the same user not shown) | |||
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 | ||
Line 31: | Line 33: | ||
==== list ==== | ==== list ==== | ||
설정된 모든 compute engine instance 를 보여준다. | |||
Displays all google compute engine instances in a project. | 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 ...)". | By default, instances from all zones are listed. The results can be narrowed down using a filter: --filter="zone:(Zone ...)". | ||
Line 45: | Line 47: | ||
===== Example ===== | ===== Example ===== | ||
<pre> | <pre> | ||
$ gcloud compute instances list --project smiling-axiom- | $ gcloud compute instances list --project smiling-axiom-2195 | ||
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS | 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 | test-instance europe-west4-a g1-small 10.164.0.2 35.204.231.99 RUNNING | ||
</pre> | </pre> | ||
=== compute ssh === | |||
지정한 instance 로 ssh 접속을 한다. | |||
<pre> | |||
gcloud compute ssh --project smiling-axiom-2195 test-instance | |||
</pre> | |||
== See also == | == See also == | ||
[[category:google cloud]] | [[category:google cloud]] |
Latest revision as of 13:03, 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-2195 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
compute ssh
지정한 instance 로 ssh 접속을 한다.
gcloud compute ssh --project smiling-axiom-2195 test-instance