Search code examples
azurekubernetestraefik

Traefik as Kubernetes Ingress on Azure - Assign static IP to Traefik service


I am trying to use Traefik as a Kubernetes Ingress on Azure Kubernetes Service. While there are docs that provide information on how to do that with Kubernetes Ingress, I cannot find information about how to do that with Traefik Ingress.

Has anyone out there achieved that and can help?

PS. I am using Helm to install Traefik


Solution

  • In the meanwhile I found it, so I am going to answer my own question.

    Like @mashov said you need

    service:
      spec:
      loadBalancerIP: YOURIP
    

    But also you need to add the following annotation

    service:
      spec:
      annotations:
      "service.beta.kubernetes.io/azure-load-balancer-resource-group": "Resource Group that contains public IP"
    

    Therefore your AKS identity needs to have the role "Network Contributor" on the resource group that holds the public IP