You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,8 +22,7 @@ Crane (FinOps Crane) is a cloud native open source project which manages cloud r
22
22
-[Getting Started](#getting-started)
23
23
-[Installation](#installation)
24
24
-[Get your Kubernetes Cost Report](#get-your-kubernetes-cost-report)
25
-
-[Analytics and Recommend Pod Resources](#analytics-and-recommend-pod-resources)
26
-
-[Analytics and Recommend HPA](#analytics-and-recommend-hpa)
25
+
-[Analytics and Recommendation](#analytics-and-recommendation)
27
26
-[RoadMap](#roadmap)
28
27
-[Contributing](#Contributing)
29
28
-[Code of Conduct](#Code-of-Conduct)
@@ -46,8 +45,8 @@ The goal of Crane is to provide a one-stop-shop project to help Kubernetes users
46
45
## Features
47
46
### Time Series Prediction
48
47
49
-
Crane predictor fetches metric data, and then outputs the prediction results.
50
-
The prediction result can be consumed by other crane components, like [EHPA](#effective-horizontalpodautoscaler) and [Analytics](#analytics).
48
+
TimeSeriesPrediction defines metric spec to predict kubernetes resources like Pod or Node.
49
+
The prediction module is the core component that other crane components relied on, like [EHPA](#effective-horizontalpodautoscaler) and [Analytics](#analytics).
51
50
52
51
Please see [this document](./docs/tutorials/using-time-series-prediction.md) to learn more.
53
52
@@ -82,8 +81,9 @@ Crane is composed of the following components:
82
81
-**Predictor** - Predicts resources metrics trends based on historical data.
83
82
-**AnalyticsController** - Analyzes resources and generate related recommendations.
84
83
-**RecommendationController** - Recommend Pod resource requests and autoscaler.
85
-
-**NodeResourceController** - Re-allocate node resource based on prediction result.
86
-
-**EffectiveHPAController** - Effective HPA based on prediction result.
84
+
-**ClusterNodePredictionController** - Create Predictor for nodes.
85
+
-**EffectiveHPAController** - Effective HPA for horizontal scaling.
86
+
-**EffectiveHPAController** - Effective VPA for vertical scaling.
87
87
-[metric-adaptor](cmd/metric-adapter). - Metric server for driving the scaling.
88
88
-[crane-agent](cmd/crane-agent). - Ensure critical workloads SLO based on abnormally detection.
89
89
-[gocrane/api](https://github.com/gocrane/api). This repository defines component-level APIs for the Crane platform.
@@ -139,13 +139,18 @@ kubectl get deploy -n crane-system
You can get created recommendation from analytics status:
307
-
308
-
```console
309
-
kubectl get analytics craned-hpa -n crane-system -o yaml
310
-
```
311
-
312
-
The output is similar to:
313
-
314
-
```console
315
-
apiVersion: analysis.crane.io/v1alpha1
316
-
kind: Analytics
317
-
metadata:
318
-
name: craned-hpa
319
-
namespace: crane-system
320
-
spec:
321
-
completionStrategy:
322
-
completionStrategyType: Periodical
323
-
periodSeconds: 86400
324
-
resourceSelectors:
325
-
- apiVersion: apps/v1
326
-
kind: Deployment
327
-
labelSelector: {}
328
-
name: craned
329
-
type: HPA
330
-
status:
331
-
lastSuccessfulTime: "2022-01-13T07:26:18Z"
332
-
recommendations:
333
-
- apiVersion: analysis.crane.io/v1alpha1
334
-
kind: Recommendation
335
-
name: craned-hpa-hpa-2f22w
336
-
namespace: crane-system
337
-
uid: 397733ee-986a-4630-af75-736d2b58bfac
338
-
```
339
-
340
-
The recommendation name presents on `status.recommendations[0].name`. Then you can get recommendation detail by running:
341
-
342
-
```console
343
-
kubectl get recommend -n crane-system craned-resource-resource-j7shb -o yaml
344
-
```
345
-
346
-
The output is similar to:
347
-
348
-
```console
349
-
apiVersion: analysis.crane.io/v1alpha1
350
-
kind: Recommendation
351
-
metadata:
352
-
name: craned-hpa-hpa-2f22w
353
-
namespace: crane-system
354
-
ownerReferences:
355
-
- apiVersion: analysis.crane.io/v1alpha1
356
-
blockOwnerDeletion: false
357
-
controller: false
358
-
kind: Analytics
359
-
name: craned-hpa
360
-
uid: b216d9c3-c52e-4c9c-b9e9-9d5b45165b1d
361
-
spec:
362
-
completionStrategy:
363
-
completionStrategyType: Periodical
364
-
periodSeconds: 86400
365
-
targetRef:
366
-
apiVersion: apps/v1
367
-
kind: Deployment
368
-
name: craned
369
-
namespace: crane-system
370
-
type: HPA
371
-
status:
372
-
conditions:
373
-
- lastTransitionTime: "2022-01-13T07:51:18Z"
374
-
message: 'Failed to offer recommend, Recommendation crane-system/craned-hpa-hpa-2f22w
375
-
error EHPAAdvisor prediction metrics data is unexpected, List length is 0 '
376
-
reason: FailedOfferRecommend
377
-
status: "False"
378
-
type: Ready
379
-
lastUpdateTime: "2022-01-13T07:51:18Z"
380
-
```
381
-
382
-
The `status.resourceRequest` is recommended by crane's recommendation engine. The fail reason is demo workload don't have enough run time.
383
-
384
-
Something you should know about HPA recommendation:
385
-
* HPA Recommendation use historic prometheus metrics to calculate, forecast and propose.
386
-
* We use **DSP** algorithm to process metrics.
387
-
* We recommend using Effective HorizontalPodAutoscaler to execute autoscaling, you can see [this document](./docs/tutorials/using-time-series-prediction.md) to learn more.
388
-
* The Workload need match following conditions:
389
-
* Existing at least one ready pod
390
-
* Ready pod ratio should larger that 50%
391
-
* Must provide cpu request for pod spec
392
-
* The workload should be running for at least **a week** to get enough metrics to forecast
393
-
* The workload's cpu load should be predictable, **too low** or **too unstable** workload often is unpredictable
191
+
Please follow [this guide](./docs/tutorials/analytics-and-recommendation.md) to learn more.
394
192
395
193
## RoadMap
396
194
Please see [this document](./docs/roadmaps/roadmap-1h-2022.md) to learn more.
0 commit comments