https://pulumi.com logo
#kubernetes
Title
# kubernetes
b

bumpy-laptop-30846

04/09/2021, 10:08 AM
Hi, I create an helm chart with Pulumi and need to access one LB service created from it. How should I go about this? In general, is it possible to get a k8s service in a Pulumi program? Actually I do this:
Copy code
export const hostname = ambassador.getResourceProperty("v1/Service", "ambassador", "status")
but status is not found. Where as with
Copy code
kubectl get svc ambassador -o yaml
I get an output with a status. Is it normal that pulumi does not find the info juste after the creation of the chart?
b

billowy-army-68599

04/09/2021, 3:54 PM
you would need to do this inside an apply so that you get the version when the chart is finished: something like:
Copy code
export const hostname = ambassador.getResourceProperty("v1/Service", "ambassador", "status").apply(status => status.loadBalancer.ingress[0].ip);
4 Views