https://pulumi.com logo
h

hundreds-article-77945

01/03/2022, 8:36 PM
Is it possible to prevent the k8s provider from reading the local kubeconfig file? IOW, requiring every request to explicitly specify a cluster via a provider?
I want to ensure that we aren’t missing a provider on any of our calls, where we could end up running against the wrong cluster.
f

freezing-architect-84290

01/03/2022, 9:05 PM
I second this questions. I just ran into the following issue:I have a basic pulumi program that created a deployment, service and ingress to Cluster A a few days ago, This morning I switched my context to Cluster B for some other work and then came back to my pulumi program to create other objects for Cluster A but when I ran
pulumi up
it pushed the new objects to Cluster B. Now my [local] state (I don’t use the pulumi cloud, atm) is out of sync. I had to manually delete the new objects from Cluster B then do a
pulumi refresh
against Cluster A.
b

billowy-army-68599

01/03/2022, 9:07 PM
not at the moment, we've generally considered this user error, but I've opened https://github.com/pulumi/pulumi-kubernetes/issues/1853 to track some improvements there
the reason this happens is because we use
client-go
for the provider, which ambiently picks up the kubeconfig
f

freezing-architect-84290

01/04/2022, 6:33 PM
thanks @billowy-army-68599
3 Views