Autoscaling QuickCase Application
Kubernetes uses Horizontal Pod Autoscaling (HPA) to automatically scale the deployments by increasing the replica count.
The chart is configured to use Autoscaling by default.
Requirements
For Autoscaling to work your cluster needs a metric server installed. It is easy to validate if this is true by running the following:
kubectl top pods
This command will only work and return results if there is a metric server on your cluster.
If you have no metric server then you want to disable autoscaling
Using autoscaling
Enable Autoscaling
By default Autoscaling in enabled in the QuickCase chart. The minimum and maximum replicas are already set, but can be overridden. The metric for scaling is also already set and should be enough to operate correctly for you, but can be adjusted.
Autoscaling is set per app. In the examples below replace <app>
with the name of the QuickCase app being adjusted.
In the next example, assuming we have a cluster of 3 nodes, we're setting the minimum replicas to 3 to ensure that we have redundancy with a pod on each node. We also don't grow too high for the maximum case and limit that to 2 per node:
<app>:
autoscaling:
minReplicas: 3
maxReplicas: 6
To adjust the measure used to influence when we scale in an out use the following:
<app>:
autoscaling:
cpuAverageUtilizationPercentage: 50
# memoryAverageUtilizationPercentage: 80
By default all our apps scale on percentage average utilization of CPU allocation. They are also able to use average memory utilization but are not configured to use that by default.
Default minimum and maximum replicas
The default minimum and maximum replicas are set as follows:
case_ui:
autoscaling:
minReplicas: 1
maxReplicas: 5
admin_ui:
autoscaling:
minReplicas: 1
maxReplicas: 3
data_store:
autoscaling:
minReplicas: 2
maxReplicas: 5
definition_store:
autoscaling:
minReplicas: 1
maxReplicas: 5
attachment_store:
autoscaling:
minReplicas: 1
maxReplicas: 5
Disable Autoscaling
You will want to disable Autoscaling if your cluster does not have a metrics server to support Horizontal Pod Autoscaling (HPA)
admin_ui:
autoscaling:
enabled: false
case_ui:
autoscaling:
enabled: false
data_store:
autoscaling:
enabled: false
definition_store:
autoscaling:
enabled: false
attachment_store:
autoscaling:
enabled: false
With autoscaling disabled we will use the static replicaCount
defined for each app. By default we deploy one instance of each app. You are able to configure the number of replicas for each app using replicaCount
In this instance we will deploy 2 instance of the <app>
<app>:
replicaCount: 2