Hello everybody, I am a bit stuck with automating...
# azure
s
Hello everybody, I am a bit stuck with automating an AKS deployment through pulumi. My specific pain is that I would like to use the "azure cni" network plugin, but I can't figure out the right options for KubernetesClusterNetworkProfile to make it use an existing subnet within an existing vnet. I would also be fine with creating a new vnet and / or subnet, but then I would need to control the addressing, such that I can peer it with another vnet afterwards. Its a piece of cake in azure portal, but I can't figure it out in Pulumi:
r
In the agentpool profiles, you can configure in which subnet the pool (vmss) will be deployed in, here’s a sample piece:
Copy code
...
agentPoolProfiles: [
      {
        count: 1,
        maxPods: 110,
        mode: 'System',
        name: 'agentpool',
        osDiskSizeGB,
        osType: 'Linux',
        type: 'VirtualMachineScaleSets',
        vmSize: 'Standard_D2s_v4',
        vnetSubnetID,
      },
...
Specifically
vnetSubnetID
In my example I already have a variable called the same so I didn’t need to expand it, but you would want it to be the subnet ID, like:
vnetSubnetID: /subscriptions/123123/resourceGroups/rgname/etc/etc
s
Ohh I see, so when I use cni I add the network config to the agent pool and not the ClusterNetworkProfile. Gotme. I was tempted to try that but then I figured that would be too far from intuitive. Thanks man!
🙏 1