Share via

Azure AKS Extension works for me, but not for EU customer.

Trevor Blackman 20 Reputation points
2025-08-01T17:19:17.78+00:00

My company has released an AKS Extension on the marketplace. It deploys successfully for us every time, but for one of our customers in EU West, it hangs for ~20m, and then fails. The error message is extremely generic: "Failed to deploy." I have created an AKS cluster in the EU West region, and it still deploys for me first try every time.

What additional information can I collect to help identify this issue?

Azure Kubernetes Service
Azure Kubernetes Service

An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.


Answer accepted by question author

  1. Anonymous
    2025-08-27T02:48:35.6933333+00:00

    Hello Trevor Blackman,

    Thank you for following steps suggested and providing us with the logs. Based on the error

    Helm installation failed: YAML parse error on mte-api-relay/templates/deployment.yaml:

    error converting YAML to JSON: yaml: line 27: did not find expected key

    The issue is not related to managed identity or network connectivity, but rather to how the Helm chart is being rendered with the values provided during extension deployment. Specifically, the value being passed to outboundToken is not being parsed correctly by Helm, which leads to the failure.

    Here are the next steps to troubleshoot the error based on the logs provided:

    1.Provide the Exact Values Used: exact command you have used to deploy the extension-configuration settings and config-protected-settings values (you can remove any secrets) to verify what value is being passed for outboundToken, since special characters, empty values, or multiline inputs can cause YAML parsing errors.

    You need to modify the command to ensure the outboundToken value is a correctly formatted YAML string. The simplest way to do this is to enclose the value in double quotes (").

    __Example:__If the previous command was like this:

    Bash

    az k8s-extension create \

      --cluster-type managedClusters \

      --cluster-name <cluster-name> \

      --resource-group <resource-group> \

      --name mteapirelay \

      --extension-type "MTEApiRelayExtension" \

      --scope cluster \

      --configuration-settings '{"outboundToken": some-token-value}'

    It should be changed to this: Bash

    az k8s-extension create \

      --cluster-type managedClusters \

      --cluster-name <cluster-name> \

      --resource-group <resource-group> \

      --name mteapirelay \

      --extension-type "MTEApiRelayExtension" \

      --scope cluster \

      --configuration-settings '{"outboundToken": "some-token-value"}'

    By adding the double quotes around the token value, it is correctly parsed as a string, which should prevent the Helm chart from failing.

    For more information, refer here: Helm | Template Functions and Pipelines

    After correcting the command, the customer should attempt to re-install the AKS extension. The new command should successfully parse the YAML, and the extension should deploy correctly.

    For more information, refer here: Cluster extensions for Azure Kubernetes Service (AKS) - Azure Kubernetes Service | Microsoft Learn

    2.Test Rendering Locally: With the same values, try rendering the Helm chart locally. If the error reproduces, it confirms the issue is with the provided input rather than the cluster.

    helm template my-release ./<chart-path> -f values.yaml

    For more information, refer here: Helm | Helm Template

    3.Inspect the values applied in the cluster: After attempting deployment, check how the environment variables were rendered in the Deployment manifest. This will whether the value was truncated, malformed, or missing.

    kubectl get deployment <extension-deployment> -n <extension-namespace> -o yaml | grep APP_SETTINGS__OUTBOUND_TOKEN -A2

    4.Validate Cluster Context: Provide the AKS version __.__Once confirm whether the cluster is public or private. Any Azure Policies or admission controllers (OPA/Gatekeeper) applied that could mutate resource manifests.

    __AKS version (az aks show --resource-group <rg> --name <cluster> --query kubernetesVersion)-  __check the version using this

    For more information, refer here: Built-in policy definitions for Azure Kubernetes Service - Azure Kubernetes Service | Microsoft Learn

    The deployment failure is caused by a YAML parsing error in the Helm chart due to the outboundToken value. Kindly follow the above steps to share the details required:

    • Share the exact --configuration-settings used.
    • Try helm template locally with those values.
    • Confirm AKS version, cluster type (public/private), and any applied Azure Policies.

    With this info, we can identify whether the issue is input-related (mostly seems like) or environment-specific. Let me know if you require any additional information from my end. I happy to help you with the queries.

    Thanks,

    Rashmika

    Was this answer helpful?

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Trevor Blackman 20 Reputation points
    2025-08-28T18:24:18.6233333+00:00

    This has been resolved.

    The issue was the user was putting in a double quote without escaping it, which obviously caused an error with Helm chart parsing.

    Thank you for all your support.

    Was this answer helpful?


  2. Nikhil Duserla 9,695 Reputation points Microsoft External Staff Moderator
    2025-08-01T20:28:55.26+00:00

    @Trevor Blackman

    Ensure that your AKS cluster is created with a managed identity, as cluster extensions won't work with service principal-based clusters.

    For new clusters created with az aks create, managed identity is configured by default. For existing service principal-based clusters that need to be switched over to managed identity, it can be enabled by running az aks update with the --enable-managed-identity flag. For more information, see Use managed identity.Troubleshoot errors when deploying AKS cluster extensions: https://learn.microsoft.com/en-us/troubleshoot/azure/azure-kubernetes/extensions/cluster-extension-deployment-errors?source=recommendationsIf you have any further queries, do let us know.

    Was this answer helpful?

    0 comments No comments

Your answer

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