GKE preemptible VMs using deployment manager

12/11/2018

I'm planning to completely adopt the GCP service creation unto Deployment Manager. But based on the documentation, I can not see any options on converting the nodes to be created into the cluster into preemptibles.

I am hoping that there is a way but just not written on the document as by experience there should be some options that are not written in the document.

Below is the jinja template for it

resources:
- name: practice-gke-clusters
  type: container.v1.cluster
  properties:
    zone: asia-east2-a
    cluster:
      name: practice-gke-clusters
      network: $(ref.practice-gke-network.selfLink)
      subnetwork: $(ref.practice-gke-network-subnet-1.selfLink)
      initialNodeCount: 1
      loggingService: logging.googleapis.com
      monitoringService: monitoring.googleapis.com
      nodeConfig:
          oauthScopes:
          - https://www.googleapis.com/auth/compute
          - https://www.googleapis.com/auth/devstorage.read_only
          - https://www.googleapis.com/auth/logging.write
          - https://www.googleapis.com/auth/monitoring
-- Dean Christian Armada
google-cloud-platform
google-deployment-manager
google-kubernetes-engine

1 Answer

12/11/2018

Preemptible VMs are in Beta stage at Google Kubernetes Engine (GKE). As per documentation, it seems you need to add preemptible value as "True" into the deployment script such as this.

-- Rahi
Source: StackOverflow