Cloud SQL

  • Cloud SQL Admin API 활성화 필요 
  • Stop
    • Scheduler의 job 생성 시, URL/Header/Body 설정 필요
    •  
    • Configure the execution 탭에서 설정

    •  

    • Target type = HTTP

      URL = https://sqladmin.googleapis.com/sql/v1beta4/projects/{프로젝트ID}/instances/{SQL인스턴스ID}

      HTTP metohd = PATCH

      HTTP headers

       Name = Content-Type
       Value = application/json; charset=utf-8

      Body = 

      {
        "settings": {
          "activationPolicy": "NEVER"
        }
      }
       

      Auth header = Add OAuth token

    • Service Account = Compute Engine default service account (또는 Cloud SQL 을 stop/start 할 수 있는 Service Account)
  •  
    •  
    • Start는 Stop과 동일하며 , Body 만 다음과 같이 입력
      {
        "settings": {
          "activationPolicy": "ALWAYS"
        }
      }

 

 

 

GKE

  • Node 숫자 줄이기/늘리기
    • Scheduler의 job 생성 시, URL/Header/Body 설정 필요
    •