Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External-dns pod crashes and is stuck in a restart loop due to a fatal error related to the ManagedIdentityCredential #4375

Open
Shadikho opened this issue Apr 9, 2024 · 1 comment

Comments

@Shadikho
Copy link

Shadikho commented Apr 9, 2024

I have an AKS cluster which has been using the bitnami external-dns helm chart (based on this project) successfully for quite some time. I don't know exactly when this issue started, but somehow the pod entered a restarting loop and the logs show the following error:
msg="ManagedIdentityCredential: ManagedIdentityCredential: Get \"http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&client_id=..............&resource=https%3A%2F%2Fmanagement.core.windows.net%2F\": context deadline exceeded"

I am using the following Terraform code to deploy the chart:

resource "helm_release" "external_dns" {
  name       = "external-dns"
  chart      = "external-dns"
  repository = "https://charts.bitnami.com/bitnami"
  namespace  = kubernetes_namespace.main["external-dns"].metadata.0.name
  version    = "6.35.0"
  values     = ["${file("${path.module}/external_dns_value.yaml")}"]

  set {
    name  = "provider"
    value = "azure-private-dns"
  }

  set {
    name = "policy"
    value = "sync"
  }

  set {
    name  = "azure.tenantId"
    value = data.azurerm_client_config.current.tenant_id
  }

  set {
    name  = "azure.subscriptionId"
    value = data.azurerm_client_config.current.subscription_id
  }

  set {
    name  = "azure.resourceGroup"
    value = azurerm_resource_group.main.name
  }

  set {
    name = "azure.useManagedIdentityExtension"
    value = true
  }

  set {
    name = "azure.userAssignedIdentityID"
    value = module.aks.kubelet_identity_id
  }

  set {
    name  = "logLevel"
    value = "info"
  }

  set {
    name  = "logFormat"
    value = "text"
  }

  set {
    name  = "sources[0]"
    value = "service"
  }

  set {
    name = "sources[1]"
    value = "ingress"
  }

}

The file external_dns_value.yaml contains the following:

fqdnTemplates:
- '{{.Name}}.{{.Namespace}}.dns-test.loadbalancer.com'

I would appreciate it if anybody could help me with this issue.

Regards
Shadi

Tasks

No tasks being tracked yet.
@WaitingForGuacamole
Copy link

I'm experiencing the exact same error when deploying via kubectl apply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants