From 799e0eff86364913e28d333d334c5da1945c4890 Mon Sep 17 00:00:00 2001 From: LeaveMyYard <33721692+LeaveMyYard@users.noreply.github.com> Date: Tue, 18 Jul 2023 13:35:33 +0300 Subject: [PATCH] Fix accessToken typo in Azure readme --- README.md | 66 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index aa0c88d6..a465f6bf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + + + ![Product Name Screen Shot][product-screenshot] +

Robusta KRR

@@ -60,17 +64,17 @@ Robusta KRR (Kubernetes Resource Recommender) is a CLI tool for optimizing resou ### Features -- **No Agent Required**: Robusta KRR is a CLI tool that runs on your local machine. It does not require running Pods in your cluster. (But it can optionally be run in-cluster for weekly [Slack reports](#slack-integration).) -- **Prometheus Integration**: Gather resource usage data using built-in Prometheus queries, with support for custom queries coming soon. -- **Extensible Strategies**: Easily create and use your own strategies for calculating resource recommendations. -- **Future Support**: Upcoming versions will support custom resources (e.g. GPUs) and custom metrics. +- **No Agent Required**: Robusta KRR is a CLI tool that runs on your local machine. It does not require running Pods in your cluster. (But it can optionally be run in-cluster for weekly [Slack reports](#slack-integration).) +- **Prometheus Integration**: Gather resource usage data using built-in Prometheus queries, with support for custom queries coming soon. +- **Extensible Strategies**: Easily create and use your own strategies for calculating resource recommendations. +- **Future Support**: Upcoming versions will support custom resources (e.g. GPUs) and custom metrics. ### Resource Allocation Statistics According to a recent [Sysdig study](https://sysdig.com/blog/millions-wasted-kubernetes/), on average, Kubernetes clusters have: -- 69% unused CPU -- 18% unused memory +- 69% unused CPU +- 18% unused memory By right-sizing your containers with KRR, you can save an average of 69% on cloud costs. @@ -83,16 +87,19 @@ Read more about [how KRR works](#how-it-works) and [KRR vs Kubernetes VPA](#diff ### With brew (MacOS/Linux): 1. Add our tap: + ```sh brew tap robusta-dev/homebrew-krr ``` 2. Install KRR: + ```sh brew install krr ``` 3. Check that installation was successfull (First launch might take a little longer): + ```sh krr --help ``` @@ -130,11 +137,11 @@ All above examples show running command as `krr ...`, replace it with `python kr ### Other Configuration Methods -* [View KRR Reports in a Web UI](#robusta-ui-integration) -* [Get a Weekly Message in Slack with KRR Recommendations](#slack-integration) -* Setup KRR on [Google Cloud Managed Prometheus -](./docs/google-cloud-managed-service-for-prometheus.md) -* Setup KRR for [Azure managed Prometheus](#azure-managed-prometheus) +- [View KRR Reports in a Web UI](#robusta-ui-integration) +- [Get a Weekly Message in Slack with KRR Recommendations](#slack-integration) +- Setup KRR on [Google Cloud Managed Prometheus + ](./docs/google-cloud-managed-service-for-prometheus.md) +- Setup KRR for [Azure managed Prometheus](#azure-managed-prometheus) @@ -190,24 +197,23 @@ krr simple --help

(back to top)

- ## How it works ### Metrics Gathering Robusta KRR uses the following Prometheus queries to gather usage data: -- CPU Usage: +- CPU Usage: - ``` - sum(irate(container_cpu_usage_seconds_total{{namespace="{object.namespace}", pod="{pod}", container="{object.container}"}}[{step}])) - ``` + ``` + sum(irate(container_cpu_usage_seconds_total{{namespace="{object.namespace}", pod="{pod}", container="{object.container}"}}[{step}])) + ``` -- Memory Usage: +- Memory Usage: - ``` - sum(container_memory_working_set_bytes{job="kubelet", metrics_path="/metrics/cadvisor", image!="", namespace="{object.namespace}", pod="{pod}", container="{object.container}"}) - ``` + ``` + sum(container_memory_working_set_bytes{job="kubelet", metrics_path="/metrics/cadvisor", image!="", namespace="{object.namespace}", pod="{pod}", container="{object.container}"}) + ``` [_Need to customize the metrics? Tell us and we'll add support._](https://github.com/robusta-dev/krr/issues/new) @@ -215,9 +221,9 @@ Robusta KRR uses the following Prometheus queries to gather usage data: By default, we use a _simple_ strategy to calculate resource recommendations. It is calculated as follows (_The exact numbers can be customized in CLI arguments_): -- For CPU, we set a request at the 99th percentile with no limit. Meaning, in 99% of the cases, your CPU request will be sufficient. For the remaining 1%, we set no limit. This means your pod can burst and use any CPU available on the node - e.g. CPU that other pods requested but aren’t using right now. +- For CPU, we set a request at the 99th percentile with no limit. Meaning, in 99% of the cases, your CPU request will be sufficient. For the remaining 1%, we set no limit. This means your pod can burst and use any CPU available on the node - e.g. CPU that other pods requested but aren’t using right now. -- For memory, we take the maximum value over the past week and add a 5% buffer. +- For memory, we take the maximum value over the past week and add a 5% buffer. ### Prometheus connection @@ -240,8 +246,6 @@ Find about how KRR tries to find the default prometheus to connect (back to top)

- ## Prometheus, Victoria Metrics and Thanos auto-discovery By default, KRR will try to auto-discover the running Prometheus Victoria Metrics and Thanos. For discovering prometheus it scan services for those labels: + ```python "app=kube-prometheus-stack-prometheus" "app=prometheus,component=server" @@ -302,14 +309,18 @@ For discovering prometheus it scan services for those labels: "app=rancher-monitoring-prometheus" "app=prometheus-prometheus" ``` + For Thanos its these labels: + ```python "app.kubernetes.io/component=query,app.kubernetes.io/name=thanos", "app.kubernetes.io/name=thanos-query", "app=thanos-query", "app=thanos-querier", ``` + And for Victoria Metrics its the following labels: + ```python "app.kubernetes.io/name=vmsingle", "app.kubernetes.io/name=victoria-metrics-single", @@ -364,7 +375,7 @@ For Azure managed Prometheus you need to generate an access token, which can be ```sh # If you are not logged in to Azure, uncomment out the following line # az login -AZURE_BEARER=$(az account get-access-token --resource=https://prometheus.monitor.azure.com --query accesssToken --output tsv); echo $AZURE_BEARER +AZURE_BEARER=$(az account get-access-token --resource=https://prometheus.monitor.azure.com --query accessToken --output tsv); echo $AZURE_BEARER ``` Than run the following command with PROMETHEUS_URL substituted for your Azure Managed Prometheus URL: @@ -462,7 +473,6 @@ Distributed under the MIT License. See [LICENSE.txt](https://github.com/robusta- If you have any questions, feel free to contact **support@robusta.dev** or message us on [robustacommunity.slack.com](https://bit.ly/robusta-slack) -

(back to top)