Google Cloud 프로젝트 구성

이 페이지에서는 GKE On-Prem을 설치하기 전에 Google Cloud 프로젝트를 구성하는 방법을 보여줍니다.

GKE On-Prem을 설치하려면 Anthos 구독이 필요합니다. Anthos 구독이 있으면 이미 다음 작업이 완료된 것입니다.

  • Google Cloud 프로젝트를 만들었습니다.
  • Google Cloud 프로젝트가 허용 목록에 포함되었습니다.
  • Google 계정이 허용 목록에 포함되었습니다.
  • 팀 구성원의 개별 Google 계정이 허용 목록에 포함되었을 수 있습니다.
  • Google Cloud 프로젝트에서 서비스 계정이 생성되고 서비스 계정이 허용 목록에 포함되었습니다. GKE On-Prem 문서에서는 이 서비스 계정이 허용 목록에 포함된 서비스 계정으로 표시됩니다.

로그인

계정 사용자 인증 정보를 사용하여 Google Cloud에 로그인합니다.

gcloud auth login

기본 프로젝트 ID 설정

다음 명령어를 사용하여 기본 프로젝트 ID를 설정합니다.

gcloud config set project [PROJECT_ID]

[PROJECT_ID]는 프로젝트 ID입니다.

기본 프로젝트 ID가 설정되었으므로, --project 플래그를 gcloud 명령어에 포함할 필요가 없습니다.

프로젝트에 필요한 API 사용 설정

Google Cloud 프로젝트에서 다음 API를 사용 설정해야 합니다.

  • cloudresourcemanager.googleapis.com
  • container.googleapis.com
  • gkeconnect.googleapis.com
  • gkehub.googleapis.com
  • serviceusage.googleapis.com
  • stackdriver.googleapis.com
  • monitoring.googleapis.com
  • logging.googleapis.com

이러한 API를 사용 설정하려면 다음 명령어를 실행합니다.

Linux 및 macOS

gcloud services enable \
    cloudresourcemanager.googleapis.com \
    container.googleapis.com \
    gkeconnect.googleapis.com \
    gkehub.googleapis.com \
    serviceusage.googleapis.com \
    stackdriver.googleapis.com \
    monitoring.googleapis.com \
    logging.googleapis.com

Windows

gcloud services enable ^
    cloudresourcemanager.googleapis.com ^
    container.googleapis.com ^
    gkeconnect.googleapis.com ^
    gkehub.googleapis.com ^
    serviceusage.googleapis.com ^
    stackdriver.googleapis.com ^
    monitoring.googleapis.com ^
    logging.googleapis.com

Cloud Monitoring 구성

Cloud Logging 및 Cloud Monitoring은 GKE On-Prem에 대해 기본적으로 사용 설정됩니다.