flat-engineer-30260
01/06/2023, 12:25 PMpulumi config set --secret kubernetes:kubeconfig --path ~/.kube/config
, something like this, it won't load the file content, and it's hard to parse the yaml to string and set with pulumi secret. The only worked way is to read it from the local file pulumi_k8s = kubernetes.Provider("pulumi_k8s", kubeconfig=(lambda path: open(path).read())("kubeconfig"))
, but it is not secure to store kubeconfig file in github. How did you do that? Confusing...dry-keyboard-94795
01/06/2023, 12:33 PMKUBECONFIG
should be set to the path of the config, ie KUBECONFIG=~/.kube/config
If your .kube/config
is setup already, then pulumi will use that
https://www.pulumi.com/registry/packages/kubernetes/installation-configuration/#setupflat-engineer-30260
01/06/2023, 12:38 PMdry-keyboard-94795
01/06/2023, 12:47 PM--help
, looks like you can set a value through stdin.
so this might work for you?
cat my/kubeconfig | config set --secret kubernetes:kubeconfig
flat-engineer-30260
01/06/2023, 12:54 PMConfiguration values can be accessed when a stack is being deployed and used to configure behavior.
If a value is not present on the command line, pulumi will prompt for the value. Multi-line values
may be set by piping a file to standard in.
My bad, I'm not go through the instruction carefully. 😂