This message was deleted.
# google-cloud
s
This message was deleted.
h
I believe spot VMs are known as preemptible nodes on a GKE cluster and you set this option on the nodePool. Heres a short example of a nodepool in typescript:
Copy code
const nodePool = new NodePool(args.nodePoolName, {
    cluster: cluster.id,
    nodeCount: args.nodesPerZone,
    maxPodsPerNode: args.maxPodsPerNode,
    nodeConfig: {
      preemptible: true,
      machineType: args.nodeMachineType,
      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>",
        "<https://www.googleapis.com/auth/cloud-platform>",
      ],
      workloadMetadataConfig: {
        mode: "GKE_METADATA"
      }
    },
  });
👍 1
c
Thanks for this! 🙂
1