ambitious-engine-26999
09/27/2021, 7:59 AMprehistoric-activity-61023
09/27/2021, 11:27 AMlocation
arg passed to gcp.container.Cluster
ambitious-engine-26999
09/27/2021, 12:16 PMconst masterVersion="1.20.10-gke.301"
const nodesVersion="1.20.10-gke.301"
const masterMachineType="e2-medium"
const nodeMachineType="n1-standard-4"
const region = "europe-west3"
export const zones = [region + "-a", region + "-b"]
// Create the GKE cluster and export it.
export const k8sCluster = new gcp.container.Cluster("gke-cluster", {
minMasterVersion: masterVersion,
removeDefaultNodePool: false,
location: region,
nodePools:[{
initialNodeCount: 1,
nodeLocations: zones,
nodeConfig: {
preemptible: true,
machineType: masterMachineType,
oauthScopes: [
"<https://www.googleapis.com/auth/compute>",
"<https://www.googleapis.com/auth/devstorage.read_only>",
"<https://www.googleapis.com/auth/logging.write>",
"<https://www.googleapis.com/auth/monitoring>",
],
},
version: masterVersion,
management: {
autoRepair: true,
autoUpgrade: true,
},
}],
});
`const nodePool = new gcp.container.NodePool(worker-node-pool
, {`
cluster: k8sCluster.name,
autoscaling: {
minNodeCount: 1,
maxNodeCount: 4,
},
location: k8sCluster.location,
nodeLocations: zones,
nodeConfig: {
preemptible: true,
machineType: nodeMachineType,
oauthScopes: [
"<https://www.googleapis.com/auth/compute>",
"<https://www.googleapis.com/auth/devstorage.read_only>",
"<https://www.googleapis.com/auth/logging.write>",
"<https://www.googleapis.com/auth/monitoring>",
],
},
version: nodesVersion,
management: {
autoRepair: true,
autoUpgrade: false,
},
}, {
dependsOn: [k8sCluster],
});
prehistoric-activity-61023
09/27/2021, 1:19 PMambitious-engine-26999
09/27/2021, 1:58 PMprehistoric-activity-61023
10/01/2021, 12:05 PMambitious-engine-26999
10/01/2021, 12:23 PM