Modern businesses live and breathe the cloud. The public cloud promises scalability and ease, but often at a steep cost. One of our customers, a fast-growing company developing supply chain management solutions, was on that track. As bills began growing past €10,000 a month, they considered a shift – toward leaner, more efficient operations without sacrificing performance. Using the mogenius solution to streamline development workflows in Kubernetes on a public cloud, they turned to us with a new challenge: How can we migrate from hyperscaler to an agile cloud provider or bare metal setup, with substantial savings and operational efficiencies? And can we be fully cloud-agnostic?
Given this challenge, there were several critical aspects to consider:
With tools like K3S, GitOps, Ansible and the mogenius operator, we set out to cut their costs drastically and gain operational advantages, such as streamlined developer experience, improved disaster recovery and more independence from vendor lock-in.
Let’s break it down step by step.
The architecture was a symphony of interconnected parts:
Our exploration for a cost-effective alternative led us to a hosting provider, where running a similar architecture would cost a fraction but had no tooling for anstraction and automation. Could we get similar performance with reduced resources and budget?
Equipped with a robust toolkit including best open-source DevOps tools like Ansible and K3s Kubernetes, we laid the groundwork for the migration. The decision was to use K3s on bare metal, which meant provisioning servers, setting up networking, running K3s, installing the mogenius operator, and deploying the application services.
The backbone of our migration, it managed infrastructure provisioning with Terraform and the deployment of the mogenius operator using Helm. Our Ansible scripts were housed in a repository, featuring distinct roles for each component. This allowed us to selectively deploy and manage tools across diverse K3s environments. Special cluster administration tools were installed solely on system nodes – Ansible handled the decision-making, optimizing node-specific installations.
The scripts were flexible, enabling us to execute only specific roles or playbooks as needed – ideal for tool upgrades without full infrastructure redeployment. Scaling easy with Ansible's capability to add new nodes on the fly by simply running a single command.
Keys essential to the operations, hosted in the repository, were highly encrypted. Before deployment, decryption was necessary, and access was managed via One Password. This setup empowered any team member to deploy the complete system globally, even theoretically from a personal laptop, by using Cloudflare to adjust IP associations. The versatility extended to deployments across multiple infrastructure services.
Transitioning to bare metal involved calculated resource allocation:
Deploying applications successfully required continuity and strategy:
Navigating traffic was pivotal to a successful migration:
The whole project took a mere three weeks to prepare and complete. The actual migration process took only 20 minutes, well below the target. And with impressive results:
This represents savings of 90%, proving that a self-managed hardware solution is often far more cost-effective for the right use case than fully managed cloud platforms.
Speed is king in the modern software landscape. The migration led to a consistent 70ms improvement in response times.
Why it’s faster:
This faster response time translates to smoother app performance, better user experience, and improved trust in the platform’s responsiveness.
With the hyperscaler, our customer relied heavily on the provider’s ecosystem, which handled many services behind the scenes – but at the cost of reduced control. Now they gained complete control over their infrastructure.
Key upgrades include:
This transition makes our customer less dependent on any vendor’s ecosystem and more adaptable to business or technical changes.
One of the most impressive improvements was in disaster recovery (DR). Our customer can now restore its infrastructure in less than 5 minutes, regardless of location.
Dealing with the failure of production nodes is one of the most critical scenarios to prepare for when running a self-managed infrastructure. With the right disaster recovery and automation strategies, failures can be mitigated swiftly and without much downtime.
Handling Node Failures
With the migration, we achieved a vendor-independent, easily portable infrastructure.
Provider-specific systems like load balancers required configuration migration to other providers and proprietary tools for networking were deeply integrated into their backends. The Container Registry locked container storage into their specific ecosystem.
These dependencies made moving to another provider costly and time-consuming.
This approach eliminates the dreaded vendor lock-in, making future transitions effortless.
Feature | Public cloud provider | Hosting Partner, Self-Managed |
---|---|---|
Cost | ~ €10,000/month | ~ €1,000/month |
Compute Resources | Fully managed VMs, Managed Kubernetes Service | User-managed bare-metal servers |
Auto-Scaling | Built-in (extra cost) | Custom configuration via Horizontal Pod Autoscaler |
Monitoring | Provider Monitoring / Log Analytics (paid) | Open-source tools (e.g., Prometheus + Grafana) |
Disaster Recovery | Additional cost for Backup/Site Recovery | Fully managed in-house with GitOps structure |
Vendor-Lock-In Risk | High due to provider-specific services | Minimal |
We helped our customer achieve what many companies aim for: reduce their infrastructure spending by over 90%, boost performance, and gain full control over their infrastructure. By moving to bare-metal servers and embracing open-source technologies like K3S and GitOps, they now run a leaner, faster, and more independent operation.
This success story exemplifies how companies can balance cost-efficiency, performance, and adaptability through thoughtful architecture design. It demonstrates that a self-managed approach, when executed effectively, can yield dramatic results, especially when compared to the limitations and costs of fully managed cloud solutions.
For businesses rethinking cloud costs and operational structures, this migration presents a roadmap worth studying: Think lean, embrace open standards, and take back control of your infrastructure.
Successfully migrating from a fully managed cloud provider to a self-managed infrastructure requires careful planning and execution. Here are three essential tips to make the process smooth and efficient:
Not all workloads are equally suited for self-managed infrastructure. During your migration planning phase, evaluate which services can effectively run in a self-managed environment and which might be better retained as managed services in the cloud.
Key considerations:
Actionable Tip: Use a hybrid approach for non-critical components during testing (e.g., keep your database in the cloud while migrating microservices to minimize operational risks while achieving significant cost savings).
To avoid downtime or service interruptions during migration, set up a parallel infrastructure in the target environment and conduct thorough testing before switching entirely.
Steps to implement parallel testing:
Once confidence is established (e.g., full traffic testing, no performance or stability issues detected), you can easily flip the DNS switch to direct live traffic to the new infrastructure.
Avoidable issues often trip up migrations. Here are the most critical pitfalls and how to avoid them:
Early identification and mitigation of these pitfalls are critical for a smooth transition.
K3s is a lightweight Kubernetes distribution designed for resource efficiency and quick deployment, making it ideal for migration to bare-metal servers. Its minimal resource requirements allow smaller nodes (e.g., 8 cores, 32GB RAM) to run Kubernetes clusters efficiently, reducing costs without sacrificing performance. It also simplifies cluster management with built-in automation for tools like Helm and Traefik.
GitOps enables version-controlled infrastructure and application deployments, ensuring consistency and repeatability during migration. With tools like ArgoCD or Flux, infrastructure as code (IaC) automates the setup of your new environment, while also allowing rapid recovery in case of failures. This approach reduces human error, minimizes downtime, and ensures every change is trackable via Git.
The top open-source DevOps tools for Kubernetes migration include:
Subscribe to our newsletter and stay on top of the latest developments