Hello :wave: I'm having issues with this: ```conf...
# kubernetes
e
Hello 👋 I'm having issues with this:
Copy code
configured Kubernetes cluster is unreachable: failed to parse kubeconfig data in `kubernetes:config:kubeconfig`- couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }
This happened after doing some refactoring (deleting >25 resources) in our cluster. Now, I'm not sure how I'm going to continue forward. I can confirm with the same credentials, I can access the cluster using
kubectl
. I can also see the resources that Pulumi is trying to delete. There's also no other changes than naming of resources. Can someone point me in the right/a direction?
Update: Seems like Pulumi stores where
kubeconfig
is, which is probably caused by the fact that we configure default
namespace
. The
kubeconfig
variable is set to the wrong path in the state file. Hypothesis: This causes Pulumi look in the wrong path for credentials, even though correct credentials are passed. The credentials are never updated, because it fails on something else.
b
@elegant-window-55250 are you using explicit providers on your k8s resources?
e
After changing path in the
kubeconfig
manually to
~/.kube/config
in the state file, I'm able to apply stuff.
I'm using explicit providers, yes
b
if you're using explicit providers, it will indeed embed the kubeconfig into your state
e
I also think that Google's new Github Actions uses a temporary path for
kubeconfig
Okay, so to strengthen this setup, we should probably use explicit namespaces and remove providers? What do you think?
Maybe ensure the
kubeconfig
is always in the same path, since we're always up-ing from Github Actions anyway.
b
i usually build my kubeconfig from a stack reference, so it's always the same, but if you're reading from a file, ensuring it's always in the right place will definitely help
e
Hm, maybe there's something we can with the Kubernetes provider for this?
I can post an issue on it 👍