sparse-intern-71089
02/08/2022, 6:49 PMbored-table-20691
02/08/2022, 6:52 PMbored-table-20691
02/08/2022, 6:52 PMchilly-plastic-75584
02/08/2022, 8:42 PMcat /workspaces/myproject/.cached/.kube/tmp.kube.config.json | gojq -c | pulumi config --stack=myorgd/dev set kubernetes:kubeconfig --secret
After this running up/refresh and other commands aren't able to connect to the Kubernetes cluster.
However, doing this
KUBECONFIG=/workspaces/myproject/.cached/.kube/tmp.kube.config pulumi up
does work. I want to avoid having to pass the kubeconfig and embed in this stack (or at least try it out to see if makes things easier)orange-policeman-59119
02/09/2022, 1:45 AMkubernetes:kubeconfig
(declared as secrets) in a test project.
I see "tmp" in the string here & that you're passing it to gojq -c
and usually kube configs are YAML, though that should be a super-set of json. You're also using KUBECONFIG
with the ".json" version of the file, is it possible that's just not a valid config?
Can you try consuming it as yaml and/or skipping the gojq -c
step, e.g.:
cat /workspaces/myproject/.cached/.kube/tmp.kube.config | pulumi config --stack=myorgd/dev set kubernetes:kubeconfig --secret
FWIW, you can set multiline strings as secrets no problem.orange-policeman-59119
02/09/2022, 1:46 AMtmp.kube.config.json
is valid, it should also work as a KUBECONFIG env var