사용할 Google 계정과 Region 및 Zone을 등록하기 위해 다음의 명령어를 실행하세요.
gcloud init
2
프롬프트에 `Sign in with a new Google Account`에 해당되는 숫자값을 입력하여 Google 계정에 로그인합니다.이미 로그인 된 계정을 사용하는 경우 해당 숫자값을 입력하세요.
Choose the account you want to use for this configuration. To use a federated user account, exit this command and sign in to the gcloud CLI with your login configuration file, then run this command again. Select an account: [1] Sign in with a new Google Account [2] Skip this step Please enter your numeric choice:
3
Google Cloud는 프로젝트를 단위로 하여 리소스를 할당하고 사용합니다. `Create a new project`에 해당되는 숫자값을 입력하여 새로운 프로젝트를 생성하세요. 만약 기존에 생성된 프로젝트를 사용하는 경우 해당 숫자값을 입력합니다.
Pick cloud project to use: [1] Enter a project ID [2] Create a new projectPlease enter numeric choice or text value (must exactly match list item):
4
Region 및 Zone의 기본값을 지정하는지 묻는 프롬프트에 y를 입력하고 기본값으로 지정할 Region/Zone에 해당하는 숫자값을 입력합니다.
Do you want to configure a default Compute Region and Zone? (Y/n)? yWhich Google Compute Engine zone would you like to use as project default?If you do not specify a zone via a command line flag while working with Compute Engine resources, the default is assumed. [1] us-east1-b [2] us-east1-c [3] us-east1-d [4] us-east4-c [5] us-east4-b [6] us-east4-a [7] us-central1-c [8] us-central1-a [9] us-central1-f [10] us-central1-b [11] us-west1-b [12] us-west1-c [13] us-west1-a...Did not print [75] options.Too many options [125]. Enter "list" at prompt to print choices fully.Please enter numeric choice or text value (must exactly match list item):
다음과 같이 표시되면 정상 처리된 것입니다.
...The Google Cloud CLI is configured and ready to use!* Commands that require authentication will use ale@example.com by default* Commands will reference project `ale` by default* Compute Engine commands will use region `asia-northeast3` by default* Compute Engine commands will use zone `asia-northeast3-a` by default...