How to change the default cluster?

Is it possible to change the default cluster? If yes, how?

Hello FlorianSuchan :wave:

The default cluster is the cluster on which your environments will be deployed by default if they are not caught by a deployment rule.
To specify the cluster on which your environment will be deployed, you can specify it when you create the environment.
You can also create deployment rules (more information in the following documentation).

We are currently working on redefining the default cluster concept and how to change it. In the meantime, you can create a deployment rule and leave the “wildcards” field empty so that it will be applied to all your new environments.

Do not hesitate if you have any further questions,

Florian from Qovery

Hi @Florian_Lepont, thanks for reaching out I understand what you mean. Was just referencing to the default setting (see screenshot) as I didn’t see a place where I could change that.

Best, Florian

Hi @FlorianSuchan,

You are right, today there is no way to modify the default cluster on this page.
A workaround to define a default cluster is to use the deployment rules: by defining a new deployment rule with the lowest priority, you will be able to define a cluster on which your new environments will be deployed if they are not matched by another, more prioritized, deployment rule. You can follow the following steps:

  1. Go to your project settings, “Deployment” tab.

  2. Create a new rule and select the cluster you want to be considered as the default one.

  3. Let the “Wildcard” field empty. By doing this, all your environment names will be caught by the rule.

  4. Save. Once you are back in the deployment rules list, drag&drop your new rule at the bottom of the list. This way, the rule will have the lowest priority and will be applied only if the other rules don’t catch the environment name.

  5. Save.

By following these steps, the “MyCluster” cluster will behave like the default cluster.
I hope this solution will be useful to you, don’t hesitate if you have any other questions.

Best, Florian

Hi @Florian_Lepont thank you, this workaround works :+1: Would still be nice if in the future there was an option to change the default cluster in cluster settings :slight_smile:

@rophilogene maybe the feature to change the default cluster was implemented, or is this still the only way to deal with it?

Hi @prki ,

the method described by Florian is still the only way to deal with this use case.