rough-hospital-81966
11/04/2023, 4:30 PMpulumi up
in a Github Action, and as part of the workflow I use the AWS cli to generate a kubeconfig file (aws eks update-kubeconfig
), which is then fed to Pulumi’s Kubernetes Provider via an environment variable. Everything’s been running great for the past 6 months, however last week our builds broke completely despite us not touching the CI/CD or Pulumi code at all.
We instantiate our provider like so:
const provider = new Provider("kubernetes-provider", {
kubeconfig: process.env.KUBECONFIG_PATH,
enableServerSideApply: true,
});
And this is the error we’ve been getting:
pulumi:providers:kubernetes (kubernetes-provider):
error: rpc error: code = Unknown desc = failed to parse 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\"" }
The variable KUBECONFIG_PATH
translates to /home/runner/.kube/config
and I’ve already confirmed the file is created by the AWS CLI as expected.
I have no idea where to even begin debugging this, so any help would be greatly appreciated.proud-pizza-80589
11/07/2023, 4:45 PM