pulumi-kubernetes: `.status.loadBalancer` field was not updated with a hostname/IP address.

Hello!

  • Vote on this issue by adding a 👍 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already)

Issue details

Hi, I am trying to run the following code:

monitoring = kubernetes.helm.v3.Release(
    "monitoring",
    name="monitoring",
    chart="kube-prometheus-stack",
    namespace="monitoring",
    repository_opts=kubernetes.helm.v3.RepositoryOptsArgs(
        repo="https://prometheus-community.github.io/helm-charts",
    ),
    values={
        "grafana": {
            "ingress": {
                "enabled": True,
            },
        },
    },
)

grafana_ingress = kubernetes.networking.v1.Ingress.get(
    "grafana-ingress",
    Output.concat(monitoring.status.namespace, "/", monitoring.status.name, "-grafana"),
    opts=ResourceOptions(depends_on=[monitoring]),
)
grafana_ip = grafana_ingress.status.load_balancer.ingress[0].ip

And I get:

$ pulumi up
...
kubernetes:networking.k8s.io/v1:Ingress (grafana-ingress):
    error: 2 errors occurred:
    	* Resource 'monitoring-grafana' was created but failed to initialize
    	* Ingress .status.loadBalancer field was not updated with a hostname/IP address.
        for more information about this error, see https://pulumi.io/xdv72s

I was monitoring the creation of ingress during the deployment. The helm.v3.Release waits for the creation of the monitoring-grafana ingress but the ingress itself got a public ip after 90 seconds. That’s why it is failing.

@rawkode

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 13
  • Comments: 15 (4 by maintainers)

Most upvoted comments

Yes it’s kubernetes.helm.v3.Chart, although I’m not aware of the difference.

I just realized that you are getting the ingress, while I am creating an ingress attached to the service created by the chart. I get the same error message, but it cannot be the issue with get as viveklak described.

I’d like to ping @mikhailshilkov and @lblackstone again as mentioned to see if they have any idea why this is only a problem for newer versions and if there’s a workaround, so people getting ingress/creating ingress based on a chart are not locked into older releases. I was hopeful #1810 was the same issue and would fix this, but the resolution did not address my problem, however it differs.

Edit: It only happens for an ingress pointing to a service created by a chart, not for any ingress for our own custom deployments and corresponding services. So it’s definitely a helm specific problem, but doesn’t seem to be the same one viveklak mentioned.

Traefik doesn’t update the status field by default – you’ll need to explicitly enable that behavior by passing something like

  • --providers.kubernetesingress.ingressendpoint.ip=127.0.0.1 or
  • --providers.kubernetesingress.ingressendpoint.hostname=localhost

I was able to reproduce this interaction with Pulumi and confirmed that setting ip/hostname allows everything to complete as expected.

See also https://github.com/traefik/traefik/issues/2173 and the docs here.