Google Cloud Platform 24

gcr-cleaner ( GCP 컨테이너 이미지 제거 )

- 필요없는 컨테이너 이미지를 계속 저장하면 비용이 늘어 남. - GCP Container Registry 의 태깅하지 않은 이미지를 제거. ( 또는 옵션을 사용하여 특정 태그를 삭제 가능 > 문서 참고.) - https://github.com/sethvargo/gcr-cleaner 은 이미지 제거 프로그램. - Cloud Run 을 통해 gcr-cleaner 를 실행. - Cloud Scheduler 를 이용하여 주기적으로 gcr-cleaner 를 실행. 1. API 기능을 활성화. gcloud services enable --project "${PROJECT_ID}" \ appengine.googleapis.com \ cloudscheduler.googleapis.com \ run.googleapis..

[GKE] Canary deployments in production - session affinity

ClientIP 기준으로 동일한 version 의 app 으로 접속을 유지. Canary 테스트의 경우 다른 버전의 app 이 배포된 상태에서 유저가 다른 버전 app으로 접속하는 것을 방지할 수 있다. kind: Service apiVersion: v1 metadata: name: "hello" spec: sessionAffinity: ClientIP selector: app: "hello" ports: - protocol: "TCP" port: 80 targetPort: 80 https://google.qwiklabs.com/focuses/639?parent=catalog