Skip to content
gcp-cloudrun logo

GCP Cloud Run

gcp-cloudrun

GCP Cloud Run 서비스 배포/관리

SKILL.md

Full skill instructions

GCP Cloud Run

Cloud Run 서비스를 배포하고 관리합니다.

사용법

/​gcp-cloudrun                      # 서비스 목록 조회
/​gcp-cloudrun deploy my-service    # 서비스 배포
/​gcp-cloudrun logs my-service      # 로그 조회
/​gcp-cloudrun traffic my-service   # 트래픽 분배

Workflow

0. API 활성화 (최초 1회)

gcloud services enable run.googleapis.com --project=$PROJECT_ID

1. 서비스 목록 조회

PROJECT_ID=$(gcloud config get-value project)
REGION=asia-northeast3

gcloud run services list --project=$PROJECT_ID --region=$REGION \
  --format="table(metadata.name,status.url,status.traffic[0].percent,metadata.creationTimestamp.date())"

2. 소스에서 직접 배포

# 현재 디렉토리의 Dockerfile 사용
gcloud run deploy SERVICE_NAME \
  --source=. \
  --region=$REGION \
  --allow-unauthenticated

# 포트 지정
gcloud run deploy SERVICE_NAME \
  --source=. \
  --region=$REGION \
  --port=8080

3. 컨테이너 이미지 배포

# Artifact Registry 이미지
gcloud run deploy SERVICE_NAME \
  --image=$REGION-docker.pkg.dev/​$PROJECT_ID/​REPO/​IMAGE:TAG \
  --region=$REGION \
  --allow-unauthenticated

# 환경변수 설정
gcloud run deploy SERVICE_NAME \
  --image=IMAGE_URL \
  --region=$REGION \
  --set-env-vars="KEY1=value1,KEY2=value2"

# 시크릿 마운트
gcloud run deploy SERVICE_NAME \
  --image=IMAGE_URL \
  --region=$REGION \
  --set-secrets="API_KEY=my-secret:latest"

4. 서비스 설정 업데이트

# 리소스 조정
gcloud run services update SERVICE_NAME \
  --region=$REGION \
  --memory=512Mi \
  --cpu=1 \
  --min-instances=0 \
  --max-instances=10 \
  --concurrency=80

# 타임아웃
gcloud run services update SERVICE_NAME \
  --region=$REGION \
  --timeout=300

5. 트래픽 관리

# 리비전 목록
gcloud run revisions list --service=SERVICE_NAME --region=$REGION

# 특정 리비전으로 100% 트래픽
gcloud run services update-traffic SERVICE_NAME \
  --region=$REGION \
  --to-revisions=REVISION_NAME=100

# 카나리 배포 (90/​10)
gcloud run services update-traffic SERVICE_NAME \
  --region=$REGION \
  --to-revisions=OLD_REV=90,NEW_REV=10

6. 로그 조회

gcloud run services logs read SERVICE_NAME \
  --region=$REGION \
  --limit=100

7. 서비스 삭제

gcloud run services delete SERVICE_NAME --region=$REGION

출력 형식

## Cloud Run 서비스 목록

| 서비스 | URL | 트래픽 | 생성일 |
|--------|-----|--------|--------|
| api-service | https://api-xxx.run.app | 100% | 2024-01-15 |
| web-frontend | https://web-xxx.run.app | 100% | 2024-02-01 |

---

### api-service 상세

| 항목 | 값 |
|------|-----|
| 리전 | asia-northeast3 |
| CPU | 1 |
| 메모리 | 512Mi |
| 최소 인스턴스 | 0 |
| 최대 인스턴스 | 10 |
| 동시성 | 80 |

비용 최적화

설정설명권장
--min-instances=0콜드 스타트 허용, 비용 절감개발/테스트
--min-instances=1항상 1개 유지, 빠른 응답프로덕션
--cpu-throttling요청 없을 때 CPU 제한기본값
--cpu-boost시작 시 CPU 부스트콜드 스타트 개선

가격 (asia-northeast3)

리소스무료 티어초과 시
CPU180,000 vCPU-초/월$0.0000024/​100ms
메모리360,000 GB-초/월$0.00000025/​100ms
요청200만 요청/월$0.40/​100만 요청

주의사항

  • 최대 요청 타임아웃: 60분
  • 최대 메모리: 32GB
  • --allow-unauthenticated 없으면 인증 필요
  • 콜드 스타트 시간 고려 (--min-instances로 완화)

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
I
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View