Unable to install Flux Extension in AKS private cluster

ChrisS 0 Reputation points
2025-03-11T08:13:45.15+00:00

We are unable to install the flux extension in our AKS private cluster. The installation of the extension runs for some time, then the cluster always ends up in "Failed" state with this error message:

{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceOperationFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"\",\"message\":\"Code=\\\"VMExtensionHandlerNonTransientError\\\" Message=\\\"The handler for VM extension type 'Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentLinux' has reported terminal failure for VM extension 'DependencyAgentLinux' with error message: '[ExtensionOperationError] Non-zero exit code: 51, /var/lib/waagent/Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentLinux-9.10.18.4770/bin/time-limit 870 scripts/install.sh >/dev/null\\\\n[stdout]\\\\n\\\\n\\\\n[stderr]\\\\n\\\\nUnsupported distribution: Ubuntu 22.04.5 LTS\\\\n\\\\nT\",\"details\":[{\"code\":\"\",\"target\":\"30\",\"message\":\"The handler for VM extension type 'Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentLinux' has reported terminal failure for VM extension 'DependencyAgentLinux' with error message: '[ExtensionOperationError] Non-zero exit code: 51, /var/lib/waagent/Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentLinux-9.10.18.4770/bin/time-limit 870 scripts/install.sh >/dev/null\\n[stdout]\\n\\n\\n[stderr]\\n\\nUnsupported distribution: Ubuntu 22.04.5 LTS\\n\\nThe Dependency Agent was not installed.\\n\\nSee [https://aka.ms/S\"}]}]}}](https://aka.ms/S/%22%7D]%7D]%7D%7D)

We already tried a LOT of things, as we are having trouble with this for weeks now, but we could not get any reproducable results. We managed to install flux exactly once, after deploying the cluster via pipeline and then manually upgrading the kubernetes version from 1.30.6 to 1.30.9 in azure portal. But when we tried that exact setup a second time, it failed again.

But when it worked once, the node image distribution cannot be the problem, as the error states, right?

According to the logs our firewall doesn't block anything from the cluster. We tried it with different kuberenetes versions, minimal cluster setup, etc... It seems like Ubuntu 22.04 is not supported by that "DependencyAgentLinux", but why then is that the default distribution for the AKS cluster? We did not choose this version explicitly in our bicep files.

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,306 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.