Hi, I am trying to add another node pool to an exi...
# google-cloud
a
Hi, I am trying to add another node pool to an existing GKE cluster but when I run pulumi, it gives me the error
Copy code
error sending request: googleapi: Error 400: Must provide an update.
Here is the change: Initial:
Copy code
const cluster = new gcpNative.container.v1.Cluster(clusterNameUS, {
  name: clusterNameUS + `-${environment}`,
  project: project,
  location: "us-west2-b",
  releaseChannel: {
    channel: "REGULAR",
  },
  initialClusterVersion: "1.21.9-gke.1002",
  workloadIdentityConfig: {
    workloadPool: workloadPool,
  },
  networkConfig: {},
  ipAllocationPolicy: {
    useIpAliases: true,
  },
  nodePools: [
    {
      config: nodeConfig,
      initialNodeCount: 3,
      name: `${environment}-us`,
      autoscaling: {
        enabled: true,
        maxNodeCount: 5,
        minNodeCount: 3,
      },
    },
    {
      config: gpuNodeConfig,
      initialNodeCount: 1,
      name: `${environment}-us-gpu`,
      autoscaling: {
        enabled: true,
        maxNodeCount: 5,
        minNodeCount: 1,
      },
    },
  ],
});
updated:
Copy code
const cluster = new gcpNative.container.v1.Cluster(clusterNameUS, {
  name: clusterNameUS + `-${environment}`,
  project: project,
  location: "us-west2-b",
  releaseChannel: {
    channel: "REGULAR",
  },
  initialClusterVersion: "1.21.9-gke.1002",
  workloadIdentityConfig: {
    workloadPool: workloadPool,
  },
  networkConfig: {},
  ipAllocationPolicy: {
    useIpAliases: true,
  },
  nodePools: [
    {
      config: nodeConfig,
      initialNodeCount: 3,
      name: `${environment}-us`,
      autoscaling: {
        enabled: true,
        maxNodeCount: 5,
        minNodeCount: 3,
      },
    },
    {
      config: gpuNodeConfig,
      initialNodeCount: 1,
      name: `${environment}-us-gpu`,
      autoscaling: {
        enabled: true,
        maxNodeCount: 5,
        minNodeCount: 1,
      },
    },
    {
      config: a100NodeConfig,
      initialNodeCount: 1,
      name: `${environment}-us-a100`,
      autoscaling: {
        enabled: true,
        maxNodeCount: 5,
        minNodeCount: 1,
      },
    },
  ],
});
The only difference is the addition of the a100 pool.
g
Unfortunately, I suspect this might be an error upstream. Someone filed a similar issue: https://github.com/pulumi/pulumi-google-native/issues/418 Are you able to add the pool via the gcloud CLI? If you can, then it might be something with the underlying API from upstream. If you can't, it might give you a better error code (there's some spots where our native provider is giving a generic code as it's still in beta, and we want to fix those)
a
I was able to add the node pool via the cli, and if I did
pulumi up
on a completely new stack it would let me do that as well. The problem was only from updating a currently existing cluster via pulumi.
g
Oh, interesting. Let me go digging for a sec; one minute
I can't pinpoint it in the schema, but it's likely there's an error message getting swallowed.
a
Sure when I get the time I will do just that.
g
Thank you!