https://pulumi.com logo
Title
a

alert-balloon-36955

05/24/2022, 8:58 PM
Hi guys, I am trying to export the LoadBalancer ip from the code, I am using a
kubernetes:core/v1:Service
, did someone know how to export or show the LB ip during the creation in order to be used in other places?
h

hallowed-australia-10473

05/24/2022, 9:02 PM
https://www.pulumi.com/registry/packages/digitalocean/api-docs/loadbalancer/#ip_python — this is for Python and for DigitalOcean, but your specific case will be similar. Once you create the load balancer, you can access the IP from the output
a

alert-balloon-36955

05/24/2022, 9:04 PM
but i am creating the LB through a Service type, using Service from pulumi https://www.pulumi.com/registry/packages/kubernetes/api-docs/core/v1/service/
You will have to query for that type of output
a

alert-balloon-36955

05/24/2022, 9:10 PM
i think i found the way, basically its on the status output, thanks
pulumi.export("ip", <service_name>.status.load_balancer.ingress[0].ip)
🙌 1
Thanks
👍 1