https://pulumi.com logo
Title
w

white-helicopter-55877

10/19/2022, 4:50 PM
Hello, trying to setup and AKS cluster with a public ip as load-balancer and a domain name. I tried several options using the following project : https://github.com/hostettler/pulumi-az-test I end up with a working AKS cluster (great!) , that has a load-balancer (amazing!), on a public ip (fantastic!), but with an fqdn that is not linked to the public ip of the load-balancer (huh!). I tried to 1) extract the public ip to force the domain but I did not manage to do it. I get the resource id of the public id created but I cannot cast it as a public ip object to set the domain. Meaning how to load a public ip object from a public ip resource-id. "/subscriptions/XXXXXX-XXX-XX-XXXx-XXXXXXXXXXXX/resourceGroups/MC_XXXXX_XXXXX_aksCluster5632b82_eastus/providers/Microsoft.Network/publicIPAddresses/XXXXX-XXXX-XXX-XXX-XXXXXXXXX" 2) tries to add a public ip to the cluster but that ip, while having a good fqdn is not used by the load-balancer Any idea on how to address. Solving either would be ok with me? Thanks a lot in advance
Hi all, found the problem (or rather a workaround). I used the wrong helm chart and it ignored the
controller.service.loadBalancerIP
directive. Using
const regEngineIngress = new k8s.helm.v3.Chart(
    "sample-engine-ingress",
    {
        repo: "<http://kubernetes.github.io|kubernetes.github.io>",
        chart: "ingress-nginx",
        version: "4.3.0",
        fetchOpts: {
            repo: "<https://kubernetes.github.io/ingress-nginx>",
        },
        namespace: clusterSvcsNamespace.metadata.name,
        values: {
            controller: {
                replicaCount: 2,
                nodeSelector: {
                    "kubernetes\.io/os": "linux",
                },
                service: {
                    loadBalancerIP: publicIp.ipAddress,
                }
            }
        },
    },
    { provider: k8sProvider },
);
That way, the public IP is assigned and since the public IP gets a A record automatically, it works nicely.