Hey everyone! I'm in a bit of a bind and need some guidance from those experienced with Kubernetes. I want to set up a Kubernetes cluster to deploy various microservices, like Redis and some background workers, but I'm not using any cloud provider this time. My local host only offers standard VMs, with no additional managed services like load balancers or databases. I'm feeling overwhelmed and have a bunch of questions:
- What's the best way to handle databases? Should they run inside or outside the cluster, and how do I manage backups?
- How can I set up logging and monitoring without cloud tools?
- How do I approach RBAC and securing the cluster?
- What's the best practice for dealing with upgrades to prevent downtime?
- How can I implement horizontal scaling without cloud autoscalers?
- Should I use separate clusters for dev, staging, and production, or can I manage it with namespaces?
- If I go with separate clusters, how do I sync configurations?
- What's the best method for managing secrets without services like Azure Key Vault?
- How do I handle persistent storage in this kind of setup?
- Lastly, how can I keep costs and VM usage under control when scaling?
I know managed Kubernetes solutions make things easier, but I see myself building everything from the ground up. If you've managed K8s on basic VMs, I'd love your insights:
- What tools did you use?
- What would you do differently if you started over?
- What mistakes should I avoid?
5 Answers
Have you looked into Cozystack? It runs on Talos Linux, designed for bare metal setups. It comes with built-in support for databases and Kubernetes, making it easier to manage everything without the headaches.
Using something lightweight like MicroK8s can simplify setup. It's designed for edge and resource-constrained environments and works well on bare metal.
For a robust solution, K3s is great. Combine it with operators for Redis and monitoring. Also, consider using Rancher to manage everything more efficiently.
Honestly, if you're turning away from cloud services, I wouldn’t complicate things further. Keeping it simple is key. Services that add complexity won't be worth it unless you have a dedicated team to manage them.
I'd just run PostgreSQL or another DB directly on a plain Debian setup, ideally with systemd timers to handle backups. However, without cloud storage, you’d need to manually move those backups to another VM, making sure they aren't on the same physical rack. I wouldn’t try anything fancy like using Longhorn for databases, though.
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically