Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverts GB line #828

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .gitbook/assets/image (1) (2) (1).png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion integrations/integrating-kubecost-with-datadog.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ In Datadog, select _Dashboards_ in the left navigation, then select _New Dashboa

On your dashboard, select the gear icon in the top right corner, then select _Import dashboard JSON..._ Add the _Kubecostdashboard.json_ file and the dashboard should automatically import. The example dashboard gives you the overview of your cluster’s monthly cost and the costs at higher levels of granularity such as containers or namespaces. See the screenshot below depicting a successful import.

![Example Kubecost dashboard in Datadog](<../.gitbook/assets/image (1) (2) (1).png>)
![Example Kubecost dashboard in Datadog](<../.gitbook/assets/image (1) (2).png>)

For extra help, read Datadog's [Copy, import, or export dashboard JSON](https://docs.datadoghq.com/dashboards/#copy-import-or-export-dashboard-json) documentation to learn how to import a dashboard JSON.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The Kubecost Allocations dashboard allows you to quickly see allocated spend across all native Kubernetes concepts, e.g. namespace, k8s label, and service. It also allows for allocating cost to organizational concepts like team, product/project, department, or environment. This document explains the metrics presented and describes how you can control the data displayed in this view.

![Allocations dashboard](<../../../.gitbook/assets/image (2) (2) (1) (1) (2) (2) (3).png>)
![Allocations dashboard](<../../../.gitbook/assets/image (2) (2) (1) (1) (2) (2).png>)

## Configuring your query

Expand All @@ -18,7 +18,7 @@ Kubecost provides a variety of options for configuring your allocations queries

### Date Range

![Date Range window](../../../images/date-range.png)
![Date Range window](/images/date-range.png)

Select the date range of the report, called the window, by setting specific start and end dates, or by using one of the preset options. You can use _Select Start_ and _Select End_ to establish custom date ranges as well.

Expand All @@ -41,7 +41,7 @@ When aggregating by namespace, the Allocations dashboard will only display names
Costs aggregations are also visible by other meaningful organizational concepts, e.g. Team, Department, and Product. These aggregations are based on Kubernetes labels, referenced at both the pod and namespace-level, with labels at the pod-level being favored over the namespace label when both are present. The Kubernetes label name used for these concepts can be configured in Settings or in [values.yaml](https://github.com/kubecost/cost-analyzer-helm-chart/blob/19908983ed7c8d4ff1d3e62d98537a39ab61bbab/cost-analyzer/values.yaml#L427-L445) after setting `kubecostProductConfigs.labelMappingConfigs.enabled` to `true`. Workloads without the relevant label will be shown as `__unallocated__`.

{% hint style="warning" %}
Kubernetes annotations can also be used for cost allocation purposes, but this requires enabling a Helm flag. [Learn more about using annotations](../../../install-and-configure/advanced-configuration/annotations.md). To see the annotations, you must add them to the label groupings via Settings or in [values.yaml](https://github.com/kubecost/cost-analyzer-helm-chart/blob/19908983ed7c8d4ff1d3e62d98537a39ab61bbab/cost-analyzer/values.yaml#L427-L445). Annotations will not work as one-off Labels added into reports directly, they will only work when added to the label groups in Settings or within the [values.yaml](https://github.com/kubecost/cost-analyzer-helm-chart/blob/19908983ed7c8d4ff1d3e62d98537a39ab61bbab/cost-analyzer/values.yaml#L427-L445).
Kubernetes annotations can also be used for cost allocation purposes, but this requires enabling a Helm flag. [Learn more about using annotations](/install-and-configure/advanced-configuration/annotations.md). To see the annotations, you must add them to the label groupings via Settings or in [values.yaml](https://github.com/kubecost/cost-analyzer-helm-chart/blob/19908983ed7c8d4ff1d3e62d98537a39ab61bbab/cost-analyzer/values.yaml#L427-L445). Annotations will not work as one-off Labels added into reports directly, they will only work when added to the label groups in Settings or within the [values.yaml](https://github.com/kubecost/cost-analyzer-helm-chart/blob/19908983ed7c8d4ff1d3e62d98537a39ab61bbab/cost-analyzer/values.yaml#L427-L445).
{% endhint %}

To find what pods are not part of the relevant label set, you can either apply an `__unallocated__` label filter in this allocation view or explore variations of the following kubectl commands:
Expand Down Expand Up @@ -137,16 +137,16 @@ The three horizontal dots icon (directly next to _Save_) will provide additional

Cost allocation metrics are available for both in-cluster and OOC resources:

| Metric | Description |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CPU | The total cost of CPU allocated to this object, e.g. namespace or deployment. The amount of CPU allocated is the greater of CPU usage and CPU requested over the measured time window. The price of allocated CPU is based on cloud billing APIs or custom pricing sheets. [Learn more](https://github.com/kubecost/cost-model#questions). |
| GPU | The cost of GPUs requested by this object, as measured by [resource limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/). Prices are based on cloud billing prices or custom pricing sheets for on-prem deployments. [Learn more](../../../architecture/gpu-allocation.md). |
| RAM | The total cost of memory allocated to this object, e.g. namespace or deployment. The amount of memory allocated is the greater of memory usage and memory requested over the measured time window. The price of allocated memory is based on cloud billing APIs or custom pricing sheets. [Learn more](https://github.com/kubecost/cost-model#questions) |
| Persistent Volume (PV) Cost | The cost of persistent storage volumes claimed by this object. Prices are based on cloud billing prices or custom pricing sheets for on-prem deployments. |
| Network | The cost of network traffic based on internet egress, cross-zone egress, and other billed transfer. Note: these costs must be enabled. [Learn more](network-allocation.md). When Network Traffic Cost are not enabled, the Node network costs from the cloud service provider's [billing integration](../../../install-and-configure/install/cloud-integration/) will be spread proportionally based on cost weighted usage. |
| Load Balancer (LB) cost | The cost of cloud-service load balancer that has been allocated. |
| Shared | The cost of shared resources allocated to this tenant. This field covers shared overhead, shared namespaces, and shared labels. Can be explored further via _Inspect Shared Costs_. Idle costs are not included in Shared costs. |
| Cost Efficiency | The percentage of requested CPU & memory dollars utilized over the measured time window. Values range from 0 to above 100 percent. Workloads with no requests but with usage OR workloads with usage > request can report efficiency above 100%. |
| Metric | Description |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CPU | The total cost of CPU allocated to this object, e.g. namespace or deployment. The amount of CPU allocated is the greater of CPU usage and CPU requested over the measured time window. The price of allocated CPU is based on cloud billing APIs or custom pricing sheets. [Learn more](https://github.com/kubecost/cost-model#questions). |
| GPU | The cost of GPUs requested by this object, as measured by [resource limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/). Prices are based on cloud billing prices or custom pricing sheets for on-prem deployments. [Learn more](/architecture/gpu-allocation.md). |
| RAM | The total cost of memory allocated to this object, e.g. namespace or deployment. The amount of memory allocated is the greater of memory usage and memory requested over the measured time window. The price of allocated memory is based on cloud billing APIs or custom pricing sheets. [Learn more](https://github.com/kubecost/cost-model#questions) |
| Persistent Volume (PV) Cost | The cost of persistent storage volumes claimed by this object. Prices are based on cloud billing prices or custom pricing sheets for on-prem deployments. |
| Network | The cost of network traffic based on internet egress, cross-zone egress, and other billed transfer. Note: these costs must be enabled. [Learn more](network-allocation.md). When Network Traffic Cost are not enabled, the Node network costs from the cloud service provider's [billing integration](/install-and-configure/install/cloud-integration/README.md) will be spread proportionally based on cost weighted usage. |
| Load Balancer (LB) cost | The cost of cloud-service load balancer that has been allocated. |
| Shared | The cost of shared resources allocated to this tenant. This field covers shared overhead, shared namespaces, and shared labels. Can be explored further via _Inspect Shared Costs_. Idle costs are not included in Shared costs. |
| Cost Efficiency | The percentage of requested CPU & memory dollars utilized over the measured time window. Values range from 0 to above 100 percent. Workloads with no requests but with usage OR workloads with usage > request can report efficiency above 100%. |

### Cost efficiency table example

Expand All @@ -158,4 +158,5 @@ The rightmost column in the Allocations metrics table allows you to perform addi

* _Inspect_: Opens an advanced cost overview of the namespace in a new tab.
* _Inspect Shared Costs_: Opens an advanced cost overview of your shared costs in a new tab.
* _View Right-Sizing_: Opens the [Container Request Right-Sizing Recommendations](../savings/container-request-right-sizing-recommendations.md) page in a new tab.
* _View Right-Sizing_: Opens the [Container Request Right-Sizing Recommendations](/using-kubecost/navigating-the-kubecost-ui/savings/container-request-right-sizing-recommendations.md) page in a new tab.

Loading