---
title: "Provides a recommendation for a scale-out, based on a current cluster layout on a given provider in a specific region."
method: PUT
path: "/recommender/provider/{provider}/service/{service}/region/{region}/cluster"
tags: ["recommend"]
---

# Provides a recommendation for a scale-out, based on a current cluster layout on a given provider in a specific region.

`PUT /recommender/provider/{provider}/service/{service}/region/{region}/cluster`

## Request

- Base URL: `/api/v1` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/recommender/provider/{provider}/service/{service}/region/{region}/cluster`
- Auth: none declared

Provides a recommendation for a scale-out, based on a current cluster layout on a given provider in a specific region.

## Path parameters

- `provider` string, required
- `service` string, required
- `region` string, required

## Request body

- RecommendClusterScaleOutRequest: ClusterScaleoutRecommendationReq encapsulates the recommendation input data
  - `actualLayout` NodePoolDesc[]: Description of the current cluster layout in:body
    - `instanceType` string: Instance type of VMs in the node pool
    - `sumNodes` integer: Number of VMs in the node pool
    - `vmClass` string: Signals that the node pool consists of regular or spot/preemptible instance types
  - `desiredCpu` number, double: Total desired number of CPUs in the cluster after the scale out
  - `desiredGpu` integer: Total desired number of GPUs in the cluster after the scale out
  - `desiredMem` number, double: Total desired memory (GB) in the cluster after the scale out
  - `excludes` string[]: Excludes is a blacklist - a slice with vm types to be excluded from the recommendation
  - `onDemandPct` integer: Percentage of regular (on-demand) nodes among the scale out nodes
  - `zone` string: Availability zone to be included in the recommendation

## Response `200`

recommendation response

- RecommendationResponse: RecommendationResponse encapsulates the recommendation response
  - `accuracy` ClusterRecommendationAccuracy: ClusterRecommendationAccuracy encapsulates recommendation accuracy
    - `cpu` number, double: Number of recommended cpus
    - `masterPrice` number, double: Amount of master instance type prices in the recommended cluster
    - `memory` number, double: The summarised amount of memory in the recommended cluster
    - `nodes` integer: Number of recommended nodes
    - `regularNodes` integer: Number of regular instance type in the recommended cluster
    - `regularPrice` number, double: Amount of regular instance type prices in the recommended cluster
    - `spotNodes` integer: Number of spot instance type in the recommended cluster
    - `spotPrice` number, double: Amount of spot instance type prices in the recommended cluster
    - `totalPrice` number, double: Total price in the recommended cluster
    - `workerPrice` number, double: Amount of worker instance type prices in the recommended cluster
    - `zone` string: Availability zone in the recommendation
  - `nodePools` NodePool[]: Recommended node pools
    - `role` string: Role in the cluster, eg. master or worker
    - `sumNodes` integer: Recommended number of nodes in the node pool
    - `vm` VirtualMachine: VirtualMachine describes an instance type
      - `avgPrice` number, double: Average price of the instance (differs from on demand price in case of spot or preemptible instances)
      - `burst` boolean: Burst signals a burst type instance
      - `category` string: Instance type category
      - `cpusPerVm` number, double: Number of CPUs in the instance type
      - `currentGen` boolean: CurrentGen the vm is of current generation
      - `gpusPerVm` number, double: Number of GPUs in the instance type
      - `memPerVm` number, double: Available memory in the instance type (GB)
      - `networkPerf` string: NetworkPerf holds the network performance
      - `networkPerfCategory` string: NetworkPerfCat holds the network performance category
      - `onDemandPrice` number, double: Regular price of the instance type
      - `type` string: Instance type
      - `zones` string[]: Zones
    - `vmClass` string: Specifies if the recommended node pool consists of regular or spot/preemptible instance types
  - `provider` string: The cloud provider
  - `region` string: Service's region
  - `service` string: Provider's service
  - `zone` string: Availability zone in the recommendation - a multi-zone recommendation means that all node pools should expand to all zones

---

[API](https://skmtc.dev/banzaicloud/apis/cluster-recommender.md) - [All operations](https://skmtc.dev/banzaicloud/apis/cluster-recommender/llms.txt) - [OpenAPI document](https://skmtc.dev/banzaicloud/apis/cluster-recommender/revisions/77c14111f647?raw)
