Day 3 - Cloud Storage · GKE
GCS 버킷 · 객체 · GKE 클러스터 개요
목차
학습 목표
- GCS 버킷 생성·업로드
- GKE가 무엇인지, 표준 K8s와의 관계
- (선택) Autopilot 또는 Standard 클러스터 생성 흐름
Cloud Storage
# 버킷 이름 전역 유일
BUCKET="pista-gcs-demo-$RANDOM"
gcloud storage buckets create gs://${BUCKET} --location=asia-northeast3
echo "hello" > /tmp/hello.txt
gcloud storage cp /tmp/hello.txt gs://${BUCKET}/
gcloud storage ls gs://${BUCKET}/
# 정리
gcloud storage rm -r gs://${BUCKET}
용도: 정적 웹, 백업, 데이터 레이크, Terraform state (권한 주의).
GKE 개요
| 모드 | 특징 |
|---|---|
| Standard | 노드 풀 직접 관리 |
| Autopilot | 노드 운영 위임, 파드 단위 과금 성격 |
# API
gcloud services enable container.googleapis.com
# Autopilot 예 (리전)
# gcloud container clusters create-auto demo-gke --region=asia-northeast3
# 자격증명
# gcloud container clusters get-credentials demo-gke --region=asia-northeast3
# kubectl get nodes
로컬 K8s 학습은 Kubernetes 모듈과 병행하세요. GKE는 관리형 컨트롤 플레인 + GCP 연동(IAM, LB, Disk)이 핵심입니다.
실습
- GCS 버킷 생성 · 파일 업/다운로드 · 삭제
- (여유 시) GKE Autopilot 생성 →
kubectl get ns→ 클러스터 삭제 - 비용·할당량 콘솔 확인