Second question: I set up a primary project that s...
# getting-started
a
Second question: I set up a primary project that sets up my k9s clusters. I then set up services. Currently pulumi seems to use whatever is my kubectl config as default config. I tried to generate a kubeconfig as stack output in the cluster project, and then to load it(using stackreference and getting the output of it, then loading it as a provider ressourceoption when creating the namespace). However this somehow doesn't seem to work anymore... Any way to debug what it's actually using for auth?
m
What exactly doesn't work anymore? The pattern you describe (creating a kubeconfig, exporting it as a stack output, then accessing this output and explicitly instantiating the provider) is quite common and often the most preferable way.
a
Aha moment. I did not set it everywhere in ressource construction as provider.
Which makes me wonder, if it is possible to set a specific provider as a default for further operations i
m
As far as I know, that's not possible, because "further operations" is not well-defined
a
I see. Then copy pasta time for "opts=pulumi.ResourceOptions(provider=k8s_provider)" everywhere
👍 1
m
You need to pass the provider to each resource it should be used for, otherwise it falls back to the default provider (if available)
a
yeah, I thought the default provider could have been changed
seems there's a request for this ( https://github.com/pulumi/pulumi/issues/2059 )
m
a
aha, so it still might be possible to define the parent's provider. probably at the pulumipulumiStack level
m
I don't think that's possible, as far as I know the pulumipulumiStack resource is a pseudo-resource or placeholder that is the parent to all other resources but cannot be modified
a
makes sense. I guess the easiest would then just to make all these ressources child to the provider in question
it does make more sense than forcing the provider in each of them
these are kind of micro projects each, (with <10 ressources) so definitely would look better at least