How can I pull (describe) an existing resource fro...
# kubernetes
g
How can I pull (describe) an existing resource from a cluster? In specific case I'm trying to get a service so I can read its status
in general, i'd like to know what the equiv pattern is in pulumi that terraform
"data" "xxxx"
style resources is? Docs are all about writes
d
You can use the
.get
method on resources. https://www.pulumi.com/docs/concepts/resources/get/
For the service resource, it'd be something like:
Copy code
k8s.core.v1.Service.get("my-service", "namespace/service-name")
g
Thanks 👍