This message was deleted.
s
This message was deleted.
p
you can explicitly create a kubernetes provider and feed it with kubeconfig from whenever you want (that includes getting it from stack secrets)
the downside of this approach is that you cannot set this provider as default (or at least it wasn’t possible - I didn’t track the issue) so you have to pass it to all resources using
opts
😵 1
Btw, did you try to set
kubernetes:kubeconfig
as a secret? I haven’t tested that but it might actually work.
🙌 1
just save it using
pulumi set
command with
--secret
flag and see if it works out of the box with the default k8s provider 🙂
e
There's an issue about disabling the default providers via some setting so that you'd have to pass kubeconfig explicitly somehow: https://github.com/pulumi/pulumi/issues/3383
And another issue to let the program set the default providers: https://github.com/pulumi/pulumi/issues/2059
q
Thanks both
Was hoping someone could comment on whether your trick of setting it as a secret worked.
But seems like it's more involved than just setting that value in the config
I'm using circle-ci to do automated deployments and typically wouldn't use pulumi to deploy to my prod cluster from my local machine.
Just got tripped up while debugging resource renaming and setting dependencies correctly
in circle-ci I use contexts to set the
KUBECONFIG
so it selects the correct cluster depending on the branch I commit to