github.com/gocrane/crane@v0.11.0/docs/tutorials/analytics-and-recommendation.md (about) 1 # Analytics and Recommendation(Deprecated) 2 3 Analytics and Recommendation provide capacity that analyzes the workload in k8s cluster and provide recommendations about resource optimize. 4 5 Two Recommendations are currently supported: 6 7 - [**ResourceRecommend**](resource-recommendation.md): Replicas recommendation analyze the actual application usage and give advice for replicas and HPA configurations. 8 - [**HPARecommend**](replicas-recommendation.md): Resource recommendation allows you to obtain recommended values for resources in a cluster and use them to improve the resource utilization of the cluster. 9 10 ## Architecture 11 12  13 14 ## An analytical process 15 16 1. Users create `Analytics` object and config ResourceSelector to select resources to be analyzed. Multiple types of resource selection (based on Group,Kind, and Version) are supported. 17 2. Analyze each selected resource in parallel and try to execute analysis and give recommendation. Each analysis process is divided into two stages: inspecting and advising: 18 1. Inspecting: Filter resources that don't match the recommended conditions. For example, for hpa recommendation, the workload that has many not running pod is excluded 19 2. Advising: Analysis and calculation based on algorithm model then provide the recommendation result. 20 3. If you paas the above two stages, it will create `Recommendation` object and display the result in `recommendation.Status` 21 4. You can find the failure reasons from `analytics.status.recommendations` 22 5. Wait for the next analytics based on the interval 23 24 ## Core concept 25 26 ### Analytics 27 28 Analysis defines a scanning analysis task. Two task types are supported: resource recommendation and hpa recommendation. Crane regularly runs analysis tasks and produces recommended results. 29 30 ### Recommendation 31 32 The recommendation shows the results of an `Analytics`. The recommended result is a YAML configuration that allows users to take appropriate optimization actions, such as adjusting the resource configuration of the application. 33 34 ### Configuration 35 36 Different analytics uses different computing models. Crane provides a default computing model and a corresponding configuration that users can modify to customize the recommended effect. You can modify the default configuration globally or modify the configuration of a single analytics task.