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

glamorous-teacher-20849

12/07/2023, 5:26 AM
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

dry-keyboard-94795

12/07/2023, 7:32 AM
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

glamorous-teacher-20849

12/07/2023, 10:55 AM
Thanks 👍