sparse-intern-71089
03/29/2022, 2:01 PMbillowy-army-68599
many-psychiatrist-74327
03/29/2022, 2:06 PMmany-psychiatrist-74327
03/29/2022, 2:10 PMconst cluster = new gcp.container.Cluster(
    name,
    {
      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: "172.10.0.0/28",
      },
      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: "172.21.0.0/20",
        clusterIpv4CidrBlock: "172.22.0.0/16",
      },
      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 }
  );machineTypepool-2billowy-army-68599
many-psychiatrist-74327
03/29/2022, 2:12 PMupdaterecreatebillowy-army-68599
many-psychiatrist-74327
03/29/2022, 2:13 PMmany-psychiatrist-74327
03/29/2022, 2:13 PM