I'm trying to get the hostname for an ingress crea...
# aws
c
I'm trying to get the hostname for an ingress created on EKS. I'm getting
AttributeError: 'ServiceStatus' object has no attribute 'loadBalancer'
Copy code
ingress = Service(
        'eks-app-svc',
        spec=ServiceSpecArgs(
            type='LoadBalancer',
            selector=app_labels,
            ports=[ServicePortArgs(port=80)],
        ), opts=ResourceOptions(provider=k8s_provider, custom_timeouts=CustomTimeouts(create="15m", delete="15m")))

    #ingress_hostname = ingress.status.apply(lambda s: s.loadBalancer.ingress[0].hostname)
    ingress_hostname = ingress.status.loadBalancer.ingress[0].hostname
ingress_hostname = ingress.status.apply(lambda s: s.load_balancer.ingress[0].hostname)