Exporting nodejs app to Kubernetes with BitBucket
I had the exact same issue, and spent waay to long troubleshooting. So for anybody coming here later:
For me the problem was a repository value I added in the pipeline settings earlier called $KUBECONFIG.
After I deleted this value everything worked as it should.
So I hit a similar issue to this trying to set the KUBECONFIG
environment variable.
The issue happening here is some tool or cli command is trying to set KUBECONFIG
to something other than a file.
In my case I was trying to be clever with kind and do this
KUBECONFIG=$(kind get kubeconfig --name kind-3)
the issue is that will set KUBECONFIG
to the VALUE that you want inside of a kubeconfig FILE instead of a path to that file as it should be
so what you really want is
kind get kubeconfig --name kind-3 > local-kind-3-kubeconfig.yamlexport KUBECONFIG=$(pwd)/local-kind-3-kubeconfig.yaml
hopefully that saves someone (maybe me again ) in the future