I have a binary file stored locally that I need to...
# general
e
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
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
somethgin like:
Copy code
new k8s.core.ConfigMap("X", {
 binaryData: {
    myFile: fs.readFileSync("myfile.bin").toString("base64")
}})
e
Thanks-- This solves me issue perfectly! (now onto the next thing 😁)