Kubernetes kubeconfig setting being set in stack from kubeconfig json as secret #8951
-
Using Go SDK. I tried to store a kubeconfig (in json format) as a secret value in a stack. Should I be able to store the kubeconfig directly in the stack and provider use it without more configuration or not? Why? I have a development stack that requires service account token + cert to authenticate and deploy. I want to allow running the plan for any team member without needing them to deal with a 5-6 command setup to generate a local kubeconfig as this stack only goes to this one target location. Since each stack's secrets are encrypted per stack I thought it might be a good use case for this, rather than expecting a local kubeconfig to be generated each time. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You can definitely store a
If this doesn't work, do let me know and I'll put together a small example repository. |
Beta Was this translation helpful? Give feedback.
-
For me it did'nt work, I'm using pulumi deployments and a have to work around this by setting a environment variable with a base64 encoded kubeconfig then running a script to decode and generate the ~/.kube/config file before the pulumi run its deployment. |
Beta Was this translation helpful? Give feedback.
You can definitely store a
kubeconfig
in a Pulumi secret. I do this with:pulumi config set --secret kubernetes:kubeconfig < /path/to/kubeconfig
If this doesn't work, do let me know and I'll put together a small example repository.