Handling multiple user tokens in kubernetes + node.js

4/24/2020

currently I have a digitalocean kubernetes cluster with a mongodb replica and a node.js connected to it. I must store for every user on my platform their stripe api token but I don't think inserting it in plain text inside mongodb is a good solution. Maybe I can use a kubernetes for every stripe token and save in the db only the environment pointing to the secret, the problem is that every time I add a secret I must restart all pods, so it's not a good solution. I want to know if are there more stable solutions for production environments

-- FakeAccount
kubernetes
mongodb
node.js
security

1 Answer

4/24/2020

There is no such built-in kubernetes feature. You can write a controller, which watch changes in secret and rolling update ta pod. There is an open source repo reloader, which might help.

-- hoque
Source: StackOverflow