Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This page describes the Kubernetes HPA v2 and Kubernetes HPA v2 component types. The reference documentation for this HPA can be found .
With HPA v2 Kubernetes introduced the ability to scale pods on different metrics, to support complex scaling scenarios, such as multiple scaling policies the Kubernetes optimization pack offers two component types:
The Kubernetes HPA v2 component type is used to optimize global HPA parameters, applied to all the scaling policies such as the maximum number of replicas or the cooldown period after a scaling action.
The Kubernetes HPA v2 component type is used to optimize specific scaling policies such as scaling on the CPU utilization or the incoming throughput. To model this scenario you can create multiple components of this type in your system.
Name | Unit | Description |
---|
Parameter | Type | Unit | Default | Domain | Restart | Description |
---|
The following tables show a list of constraints that may be required in the definition of the study, depending on the tuned parameters:
The Kubernetes optimization pack allows optimizing containerized applications running on a Kubernetes cluster. Through this optimization pack, Akamas is able to tackle the problem of distributing resources to containerized applications in order to minimize waste and ensure the quality of service.
To achieve these goals the optimization pack provides parameters that focus on the following areas:
Memory allocation
CPU allocation
Number of replicas
Similarly, the bundled metrics provide visibility on the following aspects of tuned applications:
Memory utilization
CPU utilization
The component types provided in this optimization pack allow modeling the entities found in a Kubernetes-based application, optimizing their parameters, and monitoring the key performance metrics.
Component Type | Description |
---|
Here’s the command to install the Kubernetes optimization pack optimization-pack using the Akamas CLI:
Parameter | Type | Unit | Default | Domain | Restart | Description |
---|
Formula | Notes |
---|
k8s_pod_cpu_used
millicores
The CPUs used by all containers of the pod
k8s_pod_memory_used
bytes
The total amount of memory used as sum of all containers in a pod
k8s_pod_cpu_request
millicores
The CPUs requested for the pod as sum of all container cpu requests
k8s_pod_cpu_limit
millicores
The CPUs allowed for the pod as sum of all container cpu limits
k8s_pod_memory_request
bytes
The memory requested for the pod as sum of all container memory requests
k8s_pod_memory_limit
bytes
The memory limit for the pod as sum of all container memory limits
k8s_pod_restarts
events
The number of container restarts in a pod
k8s_workload_desired_pods
pods
Number of desired pods per workload
k8s_workload_running_pods
pods
The number of running pods per workload
k8s_workload_ready_pods
pods
The number of ready pods per workload
k8s_workload_cpu_used
millicores
The total amount of CPUs used by the entire workload
k8s_workload_memory_used
bytes
The total amount of memory used by the entire workload
k8s_workload_cpu_request
millicores
The total amount of CPUs requests for the workload
k8s_workload_cpu_limit
millicores
The total amount of CPUs limits for the entire workload
k8s_workload_memory_request
millicores
The total amount of memory requests for the workload
k8s_workload_memory_limit
millicores
The total amount of memory limits for the entire workload
replicas
integer
pods
1
0
→ 1024
yes
Number of desired pods in the deployment
metric_value | integer | You should select your own default value. | You should select your own domain. | no | The target value of the metric, the semantic depends on the type of the metric (see metric_type). |
metric_type | categorical | Utilization | Utilization Value AverageValue | no | Represents how to consider the value for scaling. Refer to metrics.*.target.type for more information. |
component_name.min_replicas < component_name.max_replicas | Min replicas must be lower than max replicas |
k8s_cluster_cpu | millicores | The CPUs in the cluster |
k8s_cluster_cpu_available | millicores | The CPUs available for additional pods in the cluster |
k8s_cluster_cpu_util | percent | The percentage of used CPUs in the cluster |
k8s_cluster_cpu_request | millicores | The total CPUs requested in the cluster |
k8s_cluster_memory | bytes | The overall memory in the cluster |
k8s_cluster_memory_available | bytes | The amount of memory available for additional pods in the cluster |
k8s_cluster_memory_util | percent | The percentage of used memory in the cluster |
k8s_cluster_memory_request | bytes | The total memory requested in the cluster |
k8s_cluster_nodes | nodes | The number of nodes in the cluster |
k8s_hpa_min_replicas | pods | The lower limit for the number of replicas to which the autoscaler can scale down. |
k8s_hpa_max_replicas | pods | The upper limit for the number of replicas to which the autoscaler can scale up. |
k8s_desired_replicas | pods | Desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler. |
k8s_current_replicas | pods | Current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler. |
min_replicas | integer | pods | You should select your own default value. | You should select your own domain. | no | The lower limit for the number of replicas to which the autoscaler can scale down. min_replicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available. |
max_replicas | integer | pods | You should select your own default value. | You should select your own domain. | no | The upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that min_replicas. |
scaleDown_stabilizationWindowSeconds | integer | seconds | You should select your own default value. | 0 - 3600 | no | The number of seconds for which past recommendations should be considered while scaling up or scaling down. |
scaleDown_PeriodSeconds | integer | seconds | 300 | 1 - 1800 | no | The window of time for which the policy should hold true. |
scaleDown_value | integer | pods | You should select your own default value. | You should select your own domain. | no | The amount of change which is permitted by the policy. |
scaleUp_stabilizationWindowSeconds | integer | seconds | 0 | 0 - 3600 | no | The number of seconds for which past recommendations should be considered while scaling up or scaling down. |
scaleUp_PeriodSeconds | integer | seconds | 60 | 1 - 1800 | no | The window of time for which the policy should hold true. |
scaleUp_value | integer | pods | You should select your own default value. | You should select your own domain. | no | The amount of change which is permitted by the policy. |
Kubernetes Container |
Kubernetes Pod |
Kubernetes Workload |
Kubernetes Namespace |
Kubernetes Cluster |
This page describes the Kubernetes HPA v1 component type. The reference documentation for this HPA can be found here.
Name | Unit | Description |
---|---|---|
Parameter | Type | Unit | Default | Domain | Restart | Description |
---|---|---|---|---|---|---|
The following tables show a list of constraints that may be required in the definition of the study, depending on the tuned parameters:
Formula | Notes |
---|---|
Parameter | Type | Unit | Default | Domain | Restart | Description |
---|---|---|---|---|---|---|
Formula | Notes |
---|---|
k8s_namespace_cpu_limit
millicores
The CPU limit for the namespace
k8s_namespace_cpu_request
millicores
The CPUs requested for the namespace
k8s_namespace_memory_limit
bytes
The memory limit for the namespace
k8s_namespace_memory_request
bytes
Memory requested for the namespace
k8s_namespace_running_pods
pdds
The number of running pods in the namespace
container_cpu_used
millicores
The CPUs used by the container
container_cpu_used_max
millicores
The maximum CPUs used by the container among all container replicas
container_cpu_util
percent
The percentage of CPUs used with respect to the limit
container_cpu_util_max
percent
The maximum percentage of CPUs used with respect to the limit among all container replicas
container_cpu_throttle_time
percent
The amount of time the CPU has been throttled
container_cpu_throttled_millicores
millicores
The CPUs throttling per container in millicores
container_cpu_request
millicores
The CPUs requested for the container
container_cpu_limit
millicores
The CPUs limit for the container
container_memory_used
bytes
The total amount of memory used by the container
container_memory_used_max
bytes
The maximum memory used by the container among all container replicas
container_memory_util
percent
The percentage of memory used with respect to the limit
container_memory_util_max
percent
The maximum percentage of memory used with respect to the limit among all container replicas
container_memory_working_set
bytes
The working set usage in bytes
container_memory_resident_set
bytes
The resident set usage in bytes
container_memory_cache
bytes
The memory cache usage in bytes
container_memory_request
bytes
The memory requested for the container
container_memory_limit
bytes
The memory limit for the container
cpu_request
integer
millicores
You should select your own default value.
You should select your own domain.
yes
Amount of CPU resources requests in CPU units (milllicores)
cpu_limit
integer
millicores
You should select your own default value.
You should select your own domain.
yes
Limits on the amount of CPU resources usage in CPU units (millicores)
memory_request
integer
megabytes
You should select your own default value.
You should select your own domain.
yes
Amount of memory resources requests in megabytes
memory_limit
integer
megabytes
You should select your own default value.
You should select your own domain.
yes
Limits on the amount of memory resources usage in megabytes
component_name.cpu_request <= component_name.cpu_limit
component_name.memory_request <= component_name.memory_limit
k8s_hpa_min_replicas
pods
The lower limit for the number of replicas to which the autoscaler can scale down.
k8s_hpa_max_replicas
pods
The upper limit for the number of replicas to which the autoscaler can scale up.
k8s_desired_replicas
pods
Desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.
k8s_current_replicas
pods
Current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.
min_replicas
integer
pods
You should select your own default value.
You should select your own domain.
yes
The lower limit for the number of replicas to which the autoscaler can scale down. min_replicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.
max_replicas
integer
pods
You should select your own default value.
You should select your own domain.
yes
The upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that min_replicas.
targetCPUUtilizationPercentage
integer
percentage
You should select your own default value.
1 - 100
yes
The target average CPU utilization (represented as a percentage of the requested CPU) over all the pods in the autoscaled deployment.
component_name.min_replicas < component_name.max_replicas
Min replicas must be lower than max replicas