https://pulumi.com logo
#google-cloud
Title
# google-cloud
f

fancy-caravan-31881

11/23/2021, 5:01 PM
Hi! I’m trying to create a GKE Autopilot cluster using the google-native library, however I’m running into some trouble trying to define the node config for it and the documentation isn’t very clear to me. In GCP (Classic), it would be something like:
Copy code
const cluster = new gcp.container.Cluster("mygke", {
...
...
  enableAutopilot: true,
  initialNodeCount: 1,
  nodeConfig: {
    machineType: "n2d-standard-2",
    oauthScopes: [
      ...
    ],
  },
...
...
});
But I can’t define a
nodeConfig
in the new google-native library and the
nodePools
in not very clear to me because and still mentions
nodeConfig
and
initialNodeCount
which are no longer input properties anymore: https://www.pulumi.com/registry/packages/google-native/api-docs/container/v1/cluster/#nodepools_nodejs Does anyone here have any experience with GKE Autopilot and new google-native library? EDIT: as it stands, I can create a Autopilot cluster with no nodes
g

green-school-95910

11/23/2021, 5:51 PM
You don't control the nodes and nodePools on GKE autopilot: https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#comparison
You create the pods/deployments/whatever on it and it will be scheduled somewhere
It is closer to Cloud Run in that regard (it is not similar to cloud run, just this specific part of the mental model where you don't know/care about the underlying machines)
f

fancy-caravan-31881

11/23/2021, 6:54 PM
Yeah, I was just about to reply to say the same thing. It’s my own fault, an Autopilot cluster with initial nodes of 0 is as intended. Thanks! EDIT: user error 😂