I am attempting to use the pulumi_tls module to po...
# kubernetes
s
I am attempting to use the pulumi_tls module to populate a k8s secret how do I Base64 encode the output of the tls module for use in secrets?
b
you can either use your standard base 64 encoding package from your language, or you can pass it as
stringData
to the secret object and Kubernetes will base64 encode it for you: https://www.pulumi.com/docs/reference/pkg/kubernetes/core/v1/secret/#stringdata_nodejs
s
thanks I can create the secret the challange I have is the output of the tls module is a PEM string and I need base64 encoded for the data argument here (I am using python)
b
right, but if you pass the PEM string to the secret with
stringData
it'll base64 encode it
can you share the code you have? I can show you how it'll work