i create an aks cluster, and then use the followin...
# kubernetes
n
i create an aks cluster, and then use the following to create a k8sprovider which is then passed into each kubernetes resource using the
provider
argument of
CustomResourceOptions
.
Copy code
const k8sProvider = new k8s.Provider('k8sProvider', {
  kubeconfig: k8sCluster.kubeConfigRaw
})
This has been working fine, until i made a config change on the aks cluster where the cluster needed to be destroyed and recreated. The new aks instance was created successfully; however, the kubernetes resources were not updated to use the new provider. I have dealt with this in the past by exporting the stack config, manually editing all of the resources to use the new provider, then importing the stack config and running pulumi up. Am I doing something wrong in how i specify the provider on the resources, or is this a limitation of pulumi?
b
have you tried refreshing?
pulumi refresh
?
n
yes. that did not work. however, even if it did work, the whole point is to be able to make these kinds of changes, such as vertically scaling a cluster, without having to manually run more commands. the moment i have to run
pulumi refresh
because a
pulumi up
failed out, i have defeated the purpose.
g
This should be detected automatically by the provider, and the resources should be replaced as you expect. The provider has logic that attempts to detect if the cluster has changed, but perhaps it didn’t work in this case. Can you file an issue with more details on the pulumi/kubernetes repo?