Kf Apps can be automatically scaled based on CPU usage. You can configure autoscaling limits for your Apps and the target CPU usage for each App instance. Kf automatically scales your Apps up and down in response to demand.
By default, autoscaling is disabled. Follow the steps below to enable autoscaling.
You can view the autoscaling status for an App using the
command. If autoscaling is enabled for an App,
Instances includes the
$ kf apps Name Instances Memory Disk CPU app1 4 (autoscaled 4 to 5) 256Mi 1Gi 100m app2 1 256Mi 1Gi 100m
Autoscaling is enabled for
min-instances set to 4 and
max-instances set to 5. Autoscaling is disabled for
Update autoscaling limits
You can update the instance limits using the
kf update-autoscaling-limits app-name min-instances max-instances
Create autoscaling rule
You can create autoscaling rules using the
kf create-autoscaling-rule app-name CPU min-threshold max-threshold
Delete autoscaling rules
You can delete all autoscaling rules with the
kf delete-autoscaling-rule command. Kf only supports
one autoscaling rule.
kf delete-autoscaling-rules app-name
Enable and disable autoscaling
Autoscaling can be enabled by using
disabled by using
disable-autoscaling. When it is disabled, the
configurations, including limits and rules, are preserved.
kf enable-autoscaling app-name
kf disable-autoscaling app-name