https://pulumi.com logo
Title
a

astonishing-orange-99314

04/27/2023, 5:01 AM
I have an AKS cluster that has been created and is supposed to be managed by Pulumi, however Pulumi is really trigger-happy about replacing the cluster. For example right now the node pools are not in the exact order pulumi expects, which is causing it to want to replace the entire cluster. This is a bit impractical as I'm running stateful workloads on the cluster, where I would be really sad if they lost their state. Making Pulumi completely ignore the node pools is also not an option, as I do need to be able to apply some changes to them going forward, such as changing the min/max counts and such. Is there a way to make this experience better?
s

salmon-account-74572

04/27/2023, 3:46 PM
Can you share the output of
pulumi preview --diff
so that we can get a better sense of why Pulumi thinks it needs to replace resources?
c

clean-truck-93285

04/28/2023, 11:50 PM
I seen this exact behavior with Bicep on the Azure virtual desktop (AVD) APIs. Someone smarter than me can review the Azure resource manager (ARM) APIs and see if order matters. In my example, I was associating multiple application groups with a workspace. Easy to change the order around if it was not in a for loop. Sometimes the order would be correct on all the workspaces and other times N number would be out of order. I haven’t seen any actual change besides the confirm with what if (Bicep diff) showing a change. I also wasn’t working on an AKS cluster. Do you have a test cluster?
d

dazzling-city-47565

05/30/2023, 4:50 PM
I suggest managing your node pools with the AgentPool api, rather than the inline nodepool property