Hi,
I’m a beginner on k8s and I’ve been struggling for a long time trying to do Kubernetes storage the right way. I’ve learnt that stateless applications offers great performances and database shouldn’t be inside pods for performance/availability reasons.
So is there a way to use a S3-compatible API (like DO spaces) as a storage backend ? Ideally, I’d like to migrate my databases out of k8s in a managed SQL cluster, and use object storage for my newly created PVs. I could just use S3 directly in my applications, but this is sometimes not compatible with the design of the app (e.g: Nextcloud).
Thanks,
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If I’m understanding your question, I think all you need to do is provide your application with configuration parameters to connect to whatever storage you need.
For example, in most of my applications, I’ll create a kubernetes secret that has my database name/address/password/etc., and then I’ll provide that data to my stateless pod as an environment variable. The application can then read the environment variable and connect to the database.
Does this answer your question?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.