KaaS – scale workload cluster
Introduction
When cluster are running out of resources we can differentiate two types of scaling :
- Scale up
- Scale out
Scale up consist of adding cpu or memory on each node but we keep the same number of nodes
Scale out consist to add new nodes with the same resources as existing nodes.
Depending of your needs you can choose to go with a scale up approach or scale out, or why not both.
How to scale up a cluster
Using clusterctl and templates files
To scale up a cluster you just have to modify the VCD_CONTROL_PLANE_SIZING_POLICY or VCD_WORKER_SIZING_POLICY parameter in the ***-.yml file depending of your needs.
Then apply the template using this command :
The change of this parameter is not automatically detected by the system, which is why it is necessary, in addition to scaling out to add nodes with the new sizing, and then reducing the number of nodes to force the removal of nodes with the old sizing.
Direct modification with no code
If you don’t want to make the modification directly without any code you can edit the object directly the objects.
To scale the control plane
Launch the command below by replacing [clusterName] by the cluster name to scale.
Change the sizingPolicy parameter corresponding to the new sizingPolicy to use and save the file.
After that it is required to scale-out the cluster by adding new nodes and then reduce the number of nodes to delete old nodes which use old compute policy.
To scale the workers
Launch the command below by replacing [clusterName] by the cluster name to scale.
Change the sizingPolicy parameter corresponding to the new sizingPolicyto use and save the file.
After that it is required to scale-out the cluster by adding new nodes and then reduce the number of nodes to delete old nodes which use old compute policy.
How to scale out a cluster
Using clusterctl and templates files
To scale up a cluster you just have to modify the CONTROL_PLANE_MACHINE_COUNT or WORKER_MACHINE_COUNT parameter in the ***-config.yml file depending of your needs.
Then apply the template using this command :
Kubernetes will detect the change and will deploy new nodes.
Direct modification with no code
If you don’t want to make the modification directly without any code you can edit the object directly the objects.
To scale the control plane
Launch the command below by replacing [clusterName] by the cluster name to scale.
Change the replicas parameter corresponding to the number of node you want to have
To scale the workers
Launch the command below by replacing [clusterName] by the cluster name to scale.
Change the replicas parameter corresponding to the number of node you want to have.