:wave: hi again. I have a GKE cluster with 1 nod...
# general
👋 hi again. I have a GKE cluster with 1 nodepool. I want to either (1) add another nodepool, or (2) change the node type of the existing nodepool. But pulumi wants to recreate the entire cluster, and delete everything that depends on the cluster before doing so. Is there a way to add/update a nodepool without recreating the entire cluster??
@many-psychiatrist-74327 is this for the default nodepool? if so, so that's expected behaviour. can you share your code?
sure, give me a sec
this is the cluster definition:
Copy code
const cluster = new gcp.container.Cluster(
      name: name,
      location: config.require("region"),
      network: vpc.name,
      subnetwork: subnetwork.name,

      privateClusterConfig: {
        // Make cluster nodes private.
        enablePrivateNodes: true,
        // Allow external access to k8s API (e.g. for us to use kubectl).
        enablePrivateEndpoint: false,
        masterIpv4CidrBlock: "",
      networkingMode: "VPC_NATIVE", // Required for private clusters.
      ipAllocationPolicy: {
        // These values were chosen by keeping the "10." prefix and choosing
        // low values for the second octet, to minimize probability of collisions
        // with GCP default blocks (which tend to have a high second octet).
        // The block sizes are the same as GCP uses by default.
        servicesIpv4CidrBlock: "",
        clusterIpv4CidrBlock: "",

      nodePools: [
          name: "pool-1",
          initialNodeCount: 2,
          autoscaling: {
            minNodeCount: 1,
            maxNodeCount: 10,
          nodeConfig: {
            serviceAccount: serviceAccount.email,
            oauthScopes: ["<https://www.googleapis.com/auth/cloud-platform>"],
            machineType: "e2-medium",
            imageType: "UBUNTU",

      releaseChannel: {
        channel: "REGULAR",
      minMasterVersion: "1.21.5-gke.1302",
      nodeVersion: "1.21.5-gke.1302",
      resourceUsageExportConfig: {
        bigqueryDestination: {
          datasetId: meteringDatasetId,
      notificationConfig: {
        pubsub: {
          enabled: true,
          topic: maintenanceTopic.id,

      enableKubernetesAlpha: false,
      enableL4IlbSubsetting: false,
      enableLegacyAbac: false,
      enableTpu: false,
    { provider: gcpProvider, dependsOn: [nat], protect: true }
so, if I try to change `pool-1`’s
, or if I add another pool (
), then pulumi tries to recreate the entire cluster I really don’t want that to happen
that's a limitation on the Google side, modifying the default node group will replace the cluster. You need to use this resource: https://www.pulumi.com/registry/packages/gcp/api-docs/container/nodepool/
Basically I want pulumi to treat the change as an
instead of a
it's generally recommended to make the default node pool very small, and use explicit nodepools
hmmmm ok
ok i’ll check that out, thank you! 🙏