I am using pulumi release to deploy a helm chart including many service and trying to get one of the deployed service. https://www.pulumi.com/blog/full-access-to-helm-features-through-new-helm-release-resource-for-kubernetes/#how-do-i-use-it shows we can use Service.get to achieve this goal but I failed to find any information of the parameters of the method. Could someone explain it a bit or point me to the correct documentation on Service.get?
Thanks
I think there's a bug in that post; it should be
-master, not-redis-master:As for what's going on here, I'll try to explain, as you're right that this doesn't seem to be documented in a way that's easy to find, as it isn't part of the Kubernetes provider API, but rather part of the core Pulumi resource API.
To address the If you change up the example to use
-masterinstead, you should be able to run the Pulumi program as otherwise quoted in that blog post. Here's the complete, modified program I'm using for reference:When you deploy this program with
pulumi up(e.g., locally with Minikube), you'll have a handful of running services:Getter functions like
Service.getare explained here, in the Resources docs: https://www.pulumi.com/docs/intro/concepts/resources/get/Service.gettakes two arguments. The first is the logical name you want to use to refer to the fetched resource in your stack; it can generally be any string, as long as it's unique among other resources in the stack. The second is the "physical" (i.e., provider-native) ID by which to look it up. It looks like the Kubernetes provider wants that ID to be of the form{namespace}/{name}, which is why you need to useOutput.concatto assemble a string composed of the eventual values ofstatus.namespaceandstatus.name(as these values aren't known until the update completes). You can learn more about Outputs andOutput.concatin the Resources docs as well: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/Hope that helps! Let me know if you have any other questions. I've also submitted a PR to get that blog post fixed up.