Blog
Product
Kubernetes
Terraform
6
minutes

Three Ways to Easily Manage Many Kubernetes Clusters

Do you need to manage hundreds of Kubernetes clusters, or are you just curious to know why you could potentially need more than two clusters, or do you want to see the magic behind it? You are in the right place because you’re about to learn everything there is to know about it.
Albane Tonnellier
Product Marketing Manager
Summary
Twitter icon
linkedin icon

What is a Kubernetes cluster?

A Kubernetes cluster is a set of nodes with a certain amount of CPU and RAM that run and manage your application workload in a resilient way. Kubernetes is ideal in case of worker node disruption. There is no need to panic; Kubernetes got you back and will keep your application up and running.

Why would you want to manage many Kubernetes clusters?

It is widespread to have two separate clusters for staging and production; if you don’t already know why we have an article about it but why could you need many Kubernetes clusters? Here are a few reasons:

Location

If you want your apps to be close to your clients to reduce latency, you will probably need several clusters in several geographical zones.

Having multiple clusters can also be a requirement due to data regulation depending on the business, e.g. financial companies in Hong Kong can’t move the data out of the country.

Map of AWS global infrastructure | © Jayendra Patil

Scalability

There are two main reasons why you might need several clusters for scalability:

Anticipation: Even if you can (theoretically) reach 15 000 nodes on your cluster Kube before needing more than one cluster, you don’t want to wait until the day that this happens to dispatch everything because it will be very time consuming, so it is a good practice to do it from day one to save some headache in the long run.

Complexity: The more workload you will have on one cluster, the more complex it will be to manage, and even if the maximum nodes that you can have in a cluster Kube are (theoretically) 15 000, a lot of companies are having issues when they reach more than 1 000 nodes, that’s the experience of OpenAI that scaled their Kubernetes to 7 500 nodes and had several problems listed in this article or PayPal who scaled to over 4 000 nodes and 200k pods which also talked about their experience in this article.

Security

In this article, we’ve covered the case where you need to create a single-tenant application and physically isolate your applications for each customer. It’s a valid and widespread use case for companies working in the healthcare industry. Suppose each Kubernetes cluster is for one single user, then you can have thousands of clusters to manage.

Fun

Alright, I don’t know if it can be fun to have many Kubernetes clusters. But imagine all the fancy things that you can do. What about making a Kubernetes battleship where every ship is a Kubernetes cluster that you have to destroy? 😅

Battleship game | © Aleksandra Nigmatulina, Getty image

How to manage many Kubernetes clusters with Qovery

With Qovery's DevOps automation tool, you don’t have one but three different ways to manage many clusters so let’s dig into it and see which one is the best.

1. Web interface

This one will be pretty painful as we will manually create our clusters one by one with our lovely Qovery console.

Once you have created your organization, head to the organization settings, select “clusters", and click “add a cluster”.

You can then enter a name for your first cluster, set your credentials, add the features you want and click on “create”. You should then see your cluster, and it’s now time to click on the three dots on the right of your cluster and select “install”.

While your first cluster is deploying, you can do the same with the second one, then the third one, and repeat the process until you have the number needed 😅

Yes, it is long and fastidious, but it’s a way to do it; now, don’t panic; we have two much better ways to achieve this goal with Qovery.

2. API (bash)

Qovery provides a fluent web API with complete documentation that you can find at: api-doc.qovery.com.

Bash allows you to create as many clusters as you want easily; the line of code is the same every time except that you need to change the name of your cluster and the region if you wish to have a different region for each cluster. The example below shows you three clusters: a “prod cluster”, a “staging cluster”, and a “dev cluster”, all created with three lines of code only.

curl -H 'Content-type: application/json' -X POST -d '{"name": "prod cluster", "cloud_provider": "AWS", "region": "us-east-1"}' -H "Authorization: Token $token" "/cluster"
curl -H 'Content-type: application/json' -X POST -d '{"name": "staging cluster", "cloud_provider": "AWS", "region": "us-east-1"}' -H "Authorization: Token $token" "/cluster"
curl -H 'Content-type: application/json' -X POST -d '{"name": "dev cluster", "cloud_provider": "AWS", "region": "us-east-1"}' -H "Authorization: Token $token" "/cluster"

3. Terraform provider

If you are a big fan of Qovery already, you might know that the Qovery terraform provider is now available, and if you want to know everything about it, I have the right article for you.

How can we use this Terraform provider to manage many Kubernetes clusters?

As a video is worth a thousand words, here is a video showing how to create a cluster (and even more) with Terraform.

Now to create several ones, you need to create several “resource” with all your different clusters in your Terraform file like showcase just below with a "prod_cluster", "staging_cluster", and "dev_cluster".

terraform {
required_providers {
qovery = {
source = "qovery/qovery"
}
}
}

provider "qovery" {
# read to get your token -
# execute command `qovery token`
token = var.qovery_access_token
}

resource "qovery_aws_credentials" "your_aws_creds" {
organization_id = var.organization_id
name = "my AWS creds"
access_key_id = var.aws_access_key_id
secret_access_key = var.aws_secret_access_key
}

resource "qovery_cluster" "prod_cluster" {
organization_id = var.organization_id
credentials_id = qovery_aws_credentials.your_aws_creds.id
name = "prod cluster"
description = "this is a production cluster created with Terraform"
cloud_provider = "AWS"
region = "us-east-1"
cpu = 2000
memory = 8192

depends_on = [
qovery_aws_credentials.your_aws_creds
]
}

resource "qovery_cluster" "staging_cluster" {
organization_id = var.organization_id
credentials_id = qovery_aws_credentials.your_aws_creds.id
name = "staging cluster"
description = "this is a staging cluster created with Terraform"
cloud_provider = "AWS"
region = "us-east-1"
cpu = 2000
memory = 8192

depends_on = [
qovery_aws_credentials.your_aws_creds
]
}

resource "qovery_cluster" "dev_cluster" {
organization_id = var.organization_id
credentials_id = qovery_aws_credentials.your_aws_creds.id
name = "dev cluster"
description = "this is a dev cluster created with Terraform"
cloud_provider = "AWS"
region = "us-east-1"
cpu = 2000
memory = 8192

depends_on = [
qovery_aws_credentials.your_aws_creds
]
}

Wrapping up

Whether you need many Kubernetes clusters for scalability or location reasons or just two to separate your production and your staging, Qovery got your back with the multi-cluster feature!

With just a few lines of code, you can easily manage as many clusters as you need and use your precious time to focus on what matters the most, the success of your product.

Share on :
Twitter icon
linkedin icon
Ready to rethink the way you do DevOps?
Qovery is a DevOps automation platform that enables organizations to deliver faster and focus on creating great products.
Book a demo

Suggested articles

Platform Engineering
DevOps
Terraform
7
 minutes
Top 5 Crossplane Alternatives & Competitors

Go beyond Crossplane. Discover Qovery, the #1 DevOps automation tool, and 4 other IaC alternatives (Terraform, Pulumi) for simplified multi-cloud infrastructure management and deployment.

Morgan Perry
Co-founder
AWS
Platform Engineering
DevOps
9
 minutes
10 Best AWS ECS (Elastic Container Service) Alternatives

Compare the top 10 AWS ECS alternatives, including Qovery, Docker, EKS, and GKE. Find the best solution to simplify Kubernetes, automate DevOps, and achieve multi-cloud container deployment.

Morgan Perry
Co-founder
Platform Engineering
AWS
Kubernetes
DevOps
9
 minutes
10 Best EKS Alternatives: Simplifying Kubernetes for Modern Development

Compare the 10 best EKS alternatives for Kubernetes, including Qovery (IDP), GKE, DOKS, and OpenShift. Simplify operations, reduce costs, and accelerate deployment.

Morgan Perry
Co-founder
DevOps
Kubernetes
Platform Engineering
15
 minutes
Top 10 Openshift Alternatives & Competitors

Because various organizations need cloud application and service management that offers different levels of simplicity, cost-effectiveness, or feature sets than OpenShift, this article will review its top alternatives to help readers make an informed decision aligned with their specific infrastructure needs.

Morgan Perry
Co-founder
AI
Infrastructure Management
Product
5
 minutes
GPU workloads on EKS just got way simpler with Qovery

Running GPU workloads on EKS has never been easy, until now. With Qovery’s latest update, you can enable GPU nodes, configure GPU access, and optimize costs automatically, all without writing a single line of YAML or touching Helm charts. Qovery now handles everything behind the scenes so you can focus entirely on your applications.

Alessandro Carrano
Lead Product Manager
Kubernetes
 minutes
Kubernetes Deployment Strategies: Pros, Cons & Use Cases

Master Kubernetes deployment strategies: Rolling Update, Recreate, Blue/Green, and Canary. Learn the pros, cons, and use cases to choose the right strategy based on your uptime, risk tolerance, and resources. Simplify complex rollouts with automation.

Mélanie Dallé
Senior Marketing Manager
DevOps
Developer Experience
 minutes
AWS ECS vs. EKS vs. Elastic Beanstalk: A Comprehensive Guide

Confused about which AWS container service to use? This comprehensive guide compares the trade-offs between simplicity, control, and complexity for ECS, EKS, and Elastic Beanstalk to help you choose the right platform for your application.

Mélanie Dallé
Senior Marketing Manager
DevOps
AWS
7
 minutes
Migrating from ECS to EKS: A Complete Guide

Planning your ECS to EKS migration? Learn the strategic business case (portability, ecosystem access), navigate the step-by-step roadmap, and avoid common pitfalls (networking, resource allocation). Discover how Qovery automates EKS complexity for a seamless transition.

Morgan Perry
Co-founder

It’s time to rethink
the way you do DevOps

Say goodbye to DevOps overhead. Qovery makes infrastructure effortless, giving you full control without the trouble.