https://pulumi.com logo
#kubernetes
Title
# kubernetes
a

ambitious-fireman-71676

02/20/2020, 9:29 PM
hi community! i have a question about using pulumi config secrets as k8s secrets. if i create a pulumi config secret and i want to use that as a k8s secret (in python via):
Copy code
secret_key = Secret(
    "my-secret-key",
    data={"secret-key": config.require_secret("mySecretKey")}
)
i see that it doesnt base64 encode the value when i run
pulumi up
and look at the resource manually via
kubectl get secret -oyaml my-secret-key-<hash>
. is this intentional? or am i doing something wrong? my current workaround is to base64 encode the secret before running
pulumi config set --secret mySecret <value>
g

gorgeous-egg-16927

02/20/2020, 10:08 PM
You can use the
string_data
field instead of
data
, and k8s will automatically base64 encode it
a

ambitious-fireman-71676

02/20/2020, 10:52 PM
ah! that did it thanks
🎉 2
4 Views