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

gray-electrician-97832

08/28/2023, 6:05 PM
These all fail with either inappropiate use of Output type, or the value isn't available at the time that line is executed. I've even tried using
apply
at each dot of the "svc.status.load_balancer.ingress" nested dictionary all to no avail. What's the recommended way to base a
depends_on
on a resource that has an evolving status, like a k8s deployment or service? I'm confused and stuck. Any suggestions would be appreciated.
s

salmon-account-74572

08/28/2023, 6:19 PM
Is this all inside one Pulumi program?
g

gray-electrician-97832

08/28/2023, 9:55 PM
yes
s

salmon-account-74572

08/29/2023, 12:20 AM
Kubernetes will usually sort these things out via the reconciliation loop. Are you needing the details of the ingress in order to do something else?
g

gray-electrician-97832

08/29/2023, 1:22 AM
Yes. For example, I need the kubeconfig in order to run some local commands (OS-native kubectl command lines). I find that something like
Copy code
kc = cluster.kubeconfig.apply(lambda x: x)
## or
kc = cluster.apply(lambda x: x.kubeconfig)

## followed by

something_else(opts=pulumi.ResourceOptions(depends_on=kc)
does not work.
s

salmon-account-74572

08/29/2023, 4:24 AM
Are you able to share more of your code? Is it available in a public repo somewhere perhaps?
2 Views