Are you pre-provisioning your loadbalancer, instea...
# kubernetes
b
Are you pre-provisioning your loadbalancer, instead of letting the cloud controller provision it? or do you just want the service type loadbalancer to use a specific IP address?
a
The latter. I've provisioned a public IP outside of Pulumi so that it is durable. I am not provisioning an LB in advance. I'm only trying to pass in my public IP address to the nginx ingress controller. I think I"m on to something. I'll post my update once I've stood all of this back up and continued my work.
But, if you have any insights, that would be great too! 😄 I think the problem that I'm having is that this is all in Azure and I need some special annotations for this to work.
so.. this chart works to do what I wanted...
Copy code
// Deploy ingress-controller using helm to AKS Cluster
const nginxIngress = new k8s.helm.v3.Chart("nginx2", {
    chart: "nginx-ingress-controller",
    repo: "bitnami",
    values: {
        annotations: {
            "<http://service.beta.kubernetes.io/azure-dns-label-name|service.beta.kubernetes.io/azure-dns-label-name>": infra.getOutput("k8sDnsName"),
            "<http://service.beta.kubernetes.io/azure-load-balancer-resource-group|service.beta.kubernetes.io/azure-load-balancer-resource-group>": infra.getOutput("nodeResourceGroup")
        },
        serviceType: "LoadBalancer",
        service:{loadBalancerIP: infra.getOutput("publicIpAddress")},
        nodeCount: 2,
    }
}, {provider: k8sProvider });
There is one problem though and this is probably azure specific. I cannot create the
PublicIp
outside of the ResourceGroup that is created for the nodes in the cluster. The
PublicIp
needs to be created in that resource group or else it cannot be assigned to the nginx ingress controller.