https://pulumi.com logo
#general
Title
# general
f

full-dress-10026

06/03/2019, 5:32 PM
Can you get the AWS LB Pulumi object from an
k8s.core.v1.Service
?
w

white-balloon-205

06/03/2019, 5:36 PM
This has come up before - and as far as I can tell Kubernetes does not provide any way to retrieve this. If others have figured out how to do it - I'd love to hear.
c

creamy-potato-29402

06/03/2019, 8:06 PM
No, and this is a platform choice from AWS, which could provide a custom controller for htis.
s

shy-receptionist-99213

06/03/2019, 10:23 PM
i’ve just checked one
LoadBalancer
svc in our cluster, and you should be able to get lb dns record from
status.loadBalancer.ingress[0].hostname
not sure if this field is accessible in pulumi though
c

creamy-potato-29402

06/03/2019, 10:49 PM
the file?
s

shy-receptionist-99213

06/03/2019, 10:56 PM
Sorry, typo, I meant
field
w

white-balloon-205

06/03/2019, 11:11 PM
Ahh - yes - if I recall correctly the problem is that AWS does not offer any API to lookup LoadBalancer's by hostname, so although you know the hostname, the only way to get back the identity of the loadbalancer would be to list all loadbalancers and filter down. That's possible, but somewhat involved. What Kubernetes should do is record the ARN or
name
of the loadbalancer so that it can be looked up.
c

creamy-potato-29402

06/03/2019, 11:12 PM
yes, that’s right.