By w0rldart
Hello all,
I am researching how best to move some apps hosted as a portfolio for a small digital agency, to managed Kubernetes on DO to reduce cost and management overhead.
They range a variety of technologies hosted in a multitude of ways, but each on their own corresponding VPS:
A total of 13 servers, where some are interconnected, but the majority are completely isolated. Kubernetes is new to me, but I am actively upskilling every day, and working on containerizing those apps (reading material on this matter would be greatly appreciated)
What I am wondering, is what would be an ideal architecture to host all of them and possibly others in the future.
Thank you in advance
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!
Hi,
you must be clear about k8s migration… I recommend first learn k8s to accomplish your goal… are you using Ansible as infrastructure orchestrator? thousand of vps could be managed with a few ansible playbooks…
My point is that you need to re-deploy your services as micro-services. Think about deploy your own Postgres, MySQL o MongoDB cluster or use offered by DOK? By the way, some ideas:
1. How to organize the clusters? Per project? Per technology? Shared? In k8s you can “separate” projects using namespaces, but one namespace can access services en other namespace by default. In our case we have three different clusters: develop, staging and production. The access to different clusters is more controlled, resources limits, etc.
2. What about the pods? The pods store your containers. The most important is implement resources limits by CPU and memory (necessary to implement HPA Autoscaler). Pods are like cows.
3. How to implement different environments for all, or some, of them (staging and prod)? Start with a single cluster and create all required namespaces here. Then move prod and staging to a new clusters.
4. Is it ideal to share a containerized MySQL across various apps? Or better of with a db service per project? Divide and win. The golden rule for microservices implementation is that each service has its own database. Sometimes you can’t, but that creates highly coupled applications, which is not good. Especially when you have pods that will be created and destroyed. For production, I recommend moving this responsibility to the infrastructure provider, since all backup, synchronization, high availability, I/O, throughput and more operations not be on your side. :)
Could autoscaling be problematic in a setup like this? k8s have a good HPA (Y). Also the scaling can be Cluster Autoscaler, Vertical Scaling, etc. There are another solutions like Istio with similar amazing features. Autoscaling must be your priority.
Should CI/CD be considered from the very beginning since this is a fresh start? Required. Also you’ll need an Private Image Registry (Portus or Harbor are good options), for CI/CD can use Jenkins, CircleCI or GitLab, for CT can use SonarQube, etc.
I hope this information allows you to have clearer the requirements to face :)
An option to consider: This is my personal opinion, but running MySQL scalably/reliably is not trivial. Consider using a managed MySQL service and connecting to it from your Kubernetes cluster.
Moving your digital agency’s portfolio to managed Kubernetes on DigitalOcean (DO) is a strategic choice that can enhance scalability, reduce overhead, and streamline operations. To help guide you through this transition, I’ll address your questions and provide an overview of an ideal architecture, considering the variety and complexity of your applications.
Cluster Organization:
Given the variety in your portfolio, a combination approach might work best. For example, cluster common technologies like WordPress but keep large, complex applications like your large Django app in separate clusters if they have specific needs.
Pod Organization:
Transitioning to Kubernetes is an excellent opportunity to standardize and simplify the deployment and management of your applications. It’s advisable to start small, perhaps by moving less critical applications first to gain familiarity with Kubernetes operations. Once you are comfortable, you can proceed to migrate more significant parts of your portfolio. Remember, Kubernetes management can be complex initially but offers substantial benefits in scalability, resilience, and efficiency in the long run.
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.