Configuring cluster name in the AKS extension

I am using the Dynatrace AKS extension and there appears to be no way to configure the cluster name, so the data all comes through with cluster name “dynatrace”, which is not very useful.

There is no documented way to configure the cluster name and support told me to not use the AKS extension.

So, is there some way to configure the cluster name that I don’t know about, or could this be added into the extension configuration settings?

When I configure the extension I do have control over the naming of the cluster, see screenshot below.

If I already did the deployment, I change the cluster name via the new Kubernetes app. I select the cluster and go to Settings via the three dots

marina_pollehn_3-1784627502324.png

and then head to Collect & Capture >> Kubernetes cluster connection

Is this working for you?

We are talking about the same extension, right?

Your screenshots are from the Dynatrace UI, which generates Helm/manifest files for deploying the Dynatrace Kubernetes integration to a cluster.

I am using the Dynatrace AKS Marketplace extension, which I am deploying via Terraform. I guess there may be a configuration setting that allows setting the cluster name, but I don’t know what it is.

resource "azurerm_kubernetes_cluster_extension" "dynatrace" {
  name           = module.managed_cluster.name
  cluster_id     = module.managed_cluster.resource_id
  extension_type = "dynatrace.azuredynatraceoperator.one.x"

  plan {
    name      = "dynatrace-operator-1-x"
    product   = "azure-dynatrace-operator"
    publisher = "dynatrace"
  }

  configuration_settings = {
    "dynatrace-operator-azure.apiurl" = var.dynatrace_api_url
    "dynatrace-operator-azure.mode"   = "cloudNativeFullStack"
  }

  configuration_protected_settings = {
    "dynatrace-operator-azure.apitoken"        = var.dynatrace_api_token
    "dynatrace-operator-azure.dataingesttoken" = var.dynatrace_data_ingest_token
  }

  depends_on = [azurerm_marketplace_agreement.dynatrace]
}

resource "azurerm_marketplace_agreement" "dynatrace" {
  publisher = "dynatrace"
  offer     = "azure-dynatrace-operator"
  plan      = "dynatrace-operator-1-x"
}

My understanding is that the Dynatrace operator takes the cluster name from the name of the DynaKube resource.

I described the dynakube resource (`kubectl get dynakube -n dynatrace`) and the name is the cluster name.

Name: my-cluster
Namespace: dynatrace
Kind: DynaKube

Maybe the cluster name was set in Dynatrace by my initial configuration, which has since changed, and it is not updating. I don’t see any way in Dynatrace to remove and re-register the cluster.

I have managed to get it working. I think the fix was to change the AKS extension name to the name of the cluster. Previously we named it “dynatrace”, because I didn’t understand that the extension name was used to populate the cluster name field.

Then I had to go into the Connection settings in the Dynatrace UI and delete the cluster connection settings for the clusters. Then they reappeared with the correct cluster names.

Problem solved.