Hi folks, I'm trying to setup a GKE cluster using ...
# google-cloud
s
Hi folks, I'm trying to setup a GKE cluster using pulumi
@pulumi/gcp@8.13.1
. I see
enableAutopilot
flag defaults to false, but when I explicitly set it to false and set
removeDefaultNodePool: true,
the cluster creation fails with the below error. I have attached the code I'm using to create the cluster in the thread, can someone help me why it works when I don't explicitly set
enableAutopilot
but doesn't when I do set it. error:
Copy code
gcp:container:Cluster gke-Cluster  error: gcp:container/cluster:Cluster resource 'gke-Cluster' has a problem: Conflicting configuration arguments. "remove_default_node_pool": conflicts with enable_autopilot. Examine values at 'gke-Cluster.removeDefaultNodePool'.
    pulumi:pulumi:Stack gcp-launchpad-dev
    gcp:container:Cluster gke-Cluster **failed** 1 error
Diagnostics:
  gcp:container:Cluster (gke-Cluster):
    error: gcp:container/cluster:Cluster resource 'gke-Cluster' has a problem: Conflicting configuration arguments. "remove_default_node_pool": conflicts with enable_autopilot. Examine values at 'gke-Cluster.removeDefaultNodePool'
code for cluster creation
Copy code
const gkeCluster = new gcp.container.Cluster("gke-Cluster", {
        addonsConfig: {
            gcePersistentDiskCsiDriverConfig: {
                enabled: true,
            },
            horizontalPodAutoscaling: {
                disabled: false,
            },
        },
        clusterTelemetry: {
            type: "SYSTEM_ONLY",
        },
        controlPlaneEndpointsConfig: {
            dnsEndpointConfig: {
                allowExternalTraffic: true,
            }
        },
        datapathProvider: "ADVANCED_DATAPATH",
        description: "GKE Cluster to deploy Fennel",
        enableAutopilot: false,
        initialNodeCount: 1,
        location: input.env.region,
        minMasterVersion: gkeVersion.latestMasterVersion,
        name: `test-gke-cluster`,
        network: vpc.selfLink,
        networkingMode: "VPC_NATIVE",
        privateClusterConfig: {
            enablePrivateNodes: true,
        },
        project: input.env.projectId,
        releaseChannel: {
            channel: "STABLE",
        },
        removeDefaultNodePool: true,
        resourceLabels: input.tags,
        subnetwork: input.vpcOutput.subnet.selfLink,
        workloadIdentityConfig: {
            workloadPool: `${projectId}.svc.id.goog`,
        }
    }, { provider: gcpProvider, protect: true });