https://pulumi.com logo
#general
Title
# general
e

early-oyster-42990

09/11/2019, 2:48 PM
I have a binary file stored locally that I need to load into a volume and be accessible from a container. Using kubernetes, we can include it as a secret and use --from-file. Is there an equivalent way to do this with Pulumi?
w

white-balloon-205

09/11/2019, 2:52 PM
Are you using Pulumi with kubernetes, or with some other compute model? For kubernetes, the same options are available (you can
fs.readFileSync
to read the file and inject into Secret data).
b

best-xylophone-83824

09/11/2019, 2:52 PM
somethgin like:
Copy code
new k8s.core.ConfigMap("X", {
 binaryData: {
    myFile: fs.readFileSync("myfile.bin").toString("base64")
}})
e

early-oyster-42990

09/11/2019, 3:43 PM
Thanks-- This solves me issue perfectly! (now onto the next thing 😁)