This message was deleted.
# general
s
This message was deleted.
b
@echoing-postman-88590 this doesn't look correct, you're passing the provider as data into the secret? What are you trying to do?
e
I am not passing any data to the kubernetes Provider, I am relying on the default "read from ~/.kube/config". I would like to copy the kubeconfig content into a secret
b
you haven't actually read the file, all you've done is instantiated an empty provider. You need to use: https://www.pulumi.com/registry/packages/kubernetes/api-docs/provider/#kubeconfig_nodejs and read the filesystem file. The ambient provider doesn't read anything from disk
I'm sorta wondering why you want to put the kubeconfig in a secret though, you shouldn't really ever need to do that
e
I need the kubeconfig content for another application, nothing to do with Pulumi.
b
got it. it still shouldn't be needed, because anything running in cluster can just use service account authentication. but ultimately, you'll need to read the file from disk.
e
Yes, fair comment about the service account, in this case it is just easier to provide the kubeconfig for the application I am using. Anyway thanks for the suggestion.