https://pulumi.com logo
#general
Title
# general
p

plain-eye-9759

12/04/2019, 10:22 AM
Hello people, I'm running into this weird issue with AKS. The nodepool gets re-created any time I do
pulumi up
, which now makes the deployment take so long. This is what my cluster looks like:
Copy code
const k8sCluster = new azure.containerservice.KubernetesCluster(config.clusterName, {
    resourceGroupName: resourceGroup.name,
    location: resourceGroup.location,   
    name: config.clusterName,
    agentPoolProfiles: [{
        name: "nodepool1",
        count: config.nodeCount,
        vmSize: config.nodeSize,
        osType: "Linux"
    }],
    dnsPrefix: `${pulumi.getStack()}-kube`,
    servicePrincipal: {
        clientId: app.applicationId,
        clientSecret: spPassword
    },
    tags: {
        environment: config.env,
    },
}, { dependsOn: [app, adSpPassword] });
And here is
pulumi up
in action:
t

tall-librarian-49374

12/04/2019, 10:30 AM
AKS API has changed, you should adjust your code to use
defaultNodePool
instead. See https://github.com/pulumi/examples/blob/master/azure-ts-aks-mean/cluster.ts#L22
p

plain-eye-9759

12/04/2019, 10:46 AM
Thanks! I tried doing that, it errors about the
type
Copy code
defaultNodePool: {
   name: "nodepool",
   nodeCount: config.nodeCount,
   vmSize: config.nodeSize,
   type: "Linux"
 },
I have found available options for the "Type"
t

tall-librarian-49374

12/04/2019, 10:59 AM
I think you can just omit it
p

plain-eye-9759

12/04/2019, 11:06 AM
Yeah, thanks. I'll switch to
defaultNodePool
again
Update: using
defaultNodePool
fixed it. thanks @tall-librarian-49374
👍 2