Open sangharshcs opened 8 months ago
Hi @sangharshcs; thanks for sharing this. I believe you're correct that we don't support reading the token from the KUBE_TOKEN
environment variable today; we expect the token to be present in the kubeconfig (Eg. see https://www.pulumi.com/docs/clouds/kubernetes/guides/try-out-the-cluster/). As a workaround you should be able to copy the content of the KUBE-TOKEN
into your kubeconfig file. (Eg as described in this SO post)
Thanks @mjeffryes for acknowledging. Yeah I did executed workaround by running:
kubectl config set-credentials <name> --token $KUBE_TOKEN
What happened?
Unlike terraform (export KUBE_TOKEN) or
kubectl --token $KUBE_TOKEN get pods
, I am not able to use KUBE_TOKEN environment variable with pulumi.Example
While I was able to successfully run kubectl with same kubeconfig
Output of
pulumi about