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
Copy file name to clipboardExpand all lines: latest/ug/cluster-management/cost-monitoring-kubecost-bundles.adoc
+2-6
Original file line number
Diff line number
Diff line change
@@ -314,17 +314,13 @@ Yes. `Kubectl-cost` is an open source tool by Kubecost (Apache 2.0 License) that
314
314
315
315
Kubecost provides a web dashboard that you can access through `kubectl` port forwarding, an ingress, or a load balancer. You can also use the {aws} Load Balancer Controller to expose Kubecost and use Amazon Cognito for authentication, authorization, and user management. For more information, see link:containers/how-to-use-application-load-balancer-and-amazon-cognito-to-authenticate-users-for-your-kubernetes-web-apps[How to use Application Load Balancer and Amazon Cognito to authenticate users for your Kubernetes web apps,type="blog"] on the {aws} blog.
316
316
317
-
*Is Amazon EKS Anywhere supported?*
318
-
319
-
No.
320
-
321
317
[#kubecost-additional]
322
318
== Additional Kubecost Features
323
319
324
320
* The following features are available in both Kubecost v1 and v2.
325
-
* *Export cost metrics* – Amazon EKS optimized cost monitoring is deployed with Kubecost and Prometheus, which is an open-source monitoring system and time series database. Kubecost reads metric from Prometheus and then performs cost allocation calculations and writes the metrics back to Prometheus. The Kubecost front-end reads metrics from Prometheus and shows them on the Kubecost user interface. The architecture is illustrated in the following diagram.
321
+
***Export cost metrics* – Amazon EKS optimized cost monitoring is deployed with Kubecost and Prometheus, which is an open-source monitoring system and time series database. Kubecost reads metric from Prometheus and then performs cost allocation calculations and writes the metrics back to Prometheus. The Kubecost front-end reads metrics from Prometheus and shows them on the Kubecost user interface. The architecture is illustrated in the following diagram.
With https://prometheus.io/[Prometheus] pre-installed, you can write queries to ingest Kubecost data into your current business intelligence system for further analysis. You can also use it as a data source for your current https://grafana.com/[Grafana] dashboard to display Amazon EKS cluster costs that your internal teams are familiar with. To learn more about how to write Prometheus queries, see the https://opencost.io/docs/installation/prometheus/[Prometheus Configuration]``readme`` file on GitHub or use the example Grafana JSON models in the https://github.com/kubecost/cost-analyzer-helm-chart/tree/develop/cost-analyzer[Kubecost Github repository] as references.
330
-
* *{aws} Cost and Usage Report integration* – To perform cost allocation calculations for your Amazon EKS cluster, Kubecost retrieves the public pricing information of {aws} services and {aws} resources from the {aws} Price List API. You can also integrate Kubecost with *{aws} Cost and Usage Report* to enhance the accuracy of the pricing information specific to your {aws} account. This information includes enterprise discount programs, reserved instance usage, savings plans, and spot usage. To learn more about how the {aws} Cost and Usage Report integration works, see https://www.ibm.com/docs/en/kubecost/self-hosted/2.x?topic=integrations-aws-cloud-billing-integration[{aws} Cloud Billing Integration] in the Kubecost documentation.
326
+
***{aws} Cost and Usage Report integration* – To perform cost allocation calculations for your Amazon EKS cluster, Kubecost retrieves the public pricing information of {aws} services and {aws} resources from the {aws} Price List API. You can also integrate Kubecost with *{aws} Cost and Usage Report* to enhance the accuracy of the pricing information specific to your {aws} account. This information includes enterprise discount programs, reserved instance usage, savings plans, and spot usage. To learn more about how the {aws} Cost and Usage Report integration works, see https://www.ibm.com/docs/en/kubecost/self-hosted/2.x?topic=integrations-aws-cloud-billing-integration[{aws} Cloud Billing Integration] in the Kubecost documentation.
Alternatively, you can use the <<aws-load-balancer-controller,{aws} Load Balancer Controller>> to expose Kubecost and use Amazon Cognito for authentication, authorization, and user management. For more information, see link:containers/how-to-use-application-load-balancer-and-amazon-cognito-to-authenticate-users-for-your-kubernetes-web-apps[How to use Application Load Balancer and Amazon Cognito to authenticate users for your Kubernetes web apps,type="blog"].
28
+
. On the same device that you completed the previous step on, open a web browser and enter the following address.
29
+
+
30
+
[source,bash,subs="verbatim,attributes"]
31
+
----
32
+
http://localhost:9090
33
+
----
34
+
+
35
+
You see the Kubecost Overview page in your browser. It might take 5–10 minutes (or more) for Kubecost to gather metrics, depends on your cluster size. You can see your Amazon EKS spend, including cumulative cluster costs, associated Kubernetes asset costs, and monthly aggregated spend.
36
+
+
37
+
. To track costs at a cluster level, tag your Amazon EKS resources for billing. For more information, see <<tag-resources-for-billing>>.
38
+
39
+
40
+
* *Cost allocation* – View monthly Amazon EKS costs and cumulative costs for each of your namespaces and other dimensions over the past seven days. This is helpful for understanding which parts of your application are contributing to Amazon EKS spend.
41
+
* *Assets* – View the costs of the {aws} infrastructure assets that are associated with your Amazon EKS resources.
Copy file name to clipboardExpand all lines: latest/ug/cluster-management/cost-monitoring-kubecost.adoc
+11-99
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@ include::../attributes.txt[]
2
2
3
3
[.topic]
4
4
[#cost-monitoring-kubecost]
5
-
= Install Kubecost and access dashboard
5
+
= Install Kubecost
6
6
:info_titleabbrev: Install Kubecost
7
7
8
-
Amazon EKS supports Kubecost, which you can use to monitor your costs broken down by Kubernetes resources including Pods, nodes, namespaces, and labels. This topic covers installing Kubecost, and accessing the Kubecost dashboard.
8
+
Amazon EKS supports Kubecost, which you can use to monitor your costs broken down by Kubernetes resources including Pods, nodes, namespaces, and labels. This topic covers installing Kubecost, and accessing the Kubecost dashboard.
9
9
10
10
Amazon EKS provides an {aws} optimized bundle of Kubecost for cluster cost visibility. You can use your existing {aws} support agreements to obtain support. For more information about the available versions of Kubecost, see <<cost-monitoring-kubecost-bundles>>.
11
11
@@ -18,104 +18,16 @@ Kubecost v2 introduces several major new features. <<kubecost-v2,Learn more abou
18
18
19
19
For more information about Kubecost, see the https://www.ibm.com/docs/en/kubecost/self-hosted/2.x[Kubecost] documentation and <<cost-monitoring-faq, Frequently asked questions>>.
20
20
21
+
[#kubecost-overview]
22
+
== Install Amazon EKS optimized Kubecost bundle
21
23
22
-
[#kubecost-addon]
23
-
== Install Kubecost using Amazon EKS Add-ons
24
+
You can use one of the following procedures to install the _Amazon EKS optimized Kubecost bundle_:
24
25
25
-
[NOTE]
26
-
====
27
-
Install Kubecost as an Amazon EKS Add-on and benefit from additional features at no additional cost with the _Amazon EKS optimized Kubecost bundle_. For more information, see <<kubecost-v2>>.
28
-
====
29
-
30
-
Amazon EKS Add-ons reduce the complexity of upgrading Kubecost, and managing licenses. EKS Add-ons are integrated with the {aws} marketplace.
31
-
32
-
. View link:marketplace/seller-profile?id=983de668-2731-4c99-a7e2-74f27d796173[Kubecost in the {aws} Marketplace console,type="marketing"] and subscribe.
33
-
. Determine the name of your cluster, and the region. Verify you are logged into the {aws} CLI with sufficient permissions to manage EKS.
Learn how to <<removing-an-add-on,remove an EKS Add-on>>, such as Kubecost.
42
-
43
-
[#kubecost-helm]
44
-
== Install Kubecost using Helm
45
-
46
-
* An existing Amazon EKS cluster. To deploy one, see <<getting-started>>.
47
-
* The `kubectl` command line tool is installed on your device or {aws} CloudShell. The version can be the same as or up to one minor version earlier or later than the Kubernetes version of your cluster. For example, if your cluster version is `1.29`, you can use `kubectl` version `1.28`, `1.29`, or `1.30` with it. To install or upgrade `kubectl`, see <<install-kubectl>>.
48
-
* Helm version 3.9.0 or later configured on your device or {aws} CloudShell. To install or update Helm, see <<helm>>.
49
-
* Cluster version should be `1.21 (or higher)` and `1.31` is officially supported as of v2. Learn more at https://www.ibm.com/docs/en/kubecost/self-hosted/2.x?topic=installation-environment#ariaid-title2[Supported Kubernetes versions].
50
-
* If your cluster is version `1.23` or later, you must have the <<ebs-csi,Store Kubernetes volumes with Amazon EBS>> installed on your cluster.
51
-
52
-
. Determine the version of Kubecost to install. You can see the available versions at https://gallery.ecr.aws/kubecost/cost-analyzer[kubecost/cost-analyzer] in the Amazon ECR Public Gallery. For more information about the compatibility of Kubecost versions and Amazon EKS, see the https://www.ibm.com/docs/en/kubecost/self-hosted/2.x?topic=installation-environment[Environment Requirements] in the Kubecost documentation.
53
-
. Install Kubecost with the following command. Replace [.replaceable]`KUBECOST_VERSION` with the value retrieved from ECR, such as [.replaceable]`1.108.1`.
Kubecost releases new versions regularly. You can update your version using https://helm.sh/docs/helm/helm_upgrade/[helm upgrade]. By default, the installation includes a local https://prometheus.io/[Prometheus] server and `kube-state-metrics`. You can customize your deployment to use link:mt/integrating-kubecost-with-amazon-managed-service-for-prometheus[Amazon Managed Service for Prometheus,type="blog"] by following the documentation in link:prometheus/latest/userguide/integrating-kubecost.html[Integrating with Amazon EKS cost monitoring,type="documentation"]. For a list of all other settings that you can configure, see the https://github.com/kubecost/cost-analyzer-helm-chart/blob/develop/cost-analyzer/values-eks-cost-monitoring.yaml[sample configuration file] on GitHub.
67
-
68
-
+
69
-
* You can remove Kubecost from your cluster with the following commands.
Alternatively, you can use the <<aws-load-balancer-controller,{aws} Load Balancer Controller>> to expose Kubecost and use Amazon Cognito for authentication, authorization, and user management. For more information, see link:containers/how-to-use-application-load-balancer-and-amazon-cognito-to-authenticate-users-for-your-kubernetes-web-apps[How to use Application Load Balancer and Amazon Cognito to authenticate users for your Kubernetes web apps,type="blog"].
107
-
. On the same device that you completed the previous step on, open a web browser and enter the following address.
108
-
+
109
-
[source,bash,subs="verbatim,attributes"]
110
-
----
111
-
http://localhost:9090
112
-
----
113
-
+
114
-
You see the Kubecost Overview page in your browser. It might take 5–10 minutes for Kubecost to gather metrics. You can see your Amazon EKS spend, including cumulative cluster costs, associated Kubernetes asset costs, and monthly aggregated spend.
. To track costs at a cluster level, tag your Amazon EKS resources for billing. For more information, see <<tag-resources-for-billing>>.
26
+
* Before start, it is recommended to review https://www.ibm.com/docs/en/kubecost/self-hosted/2.x?topic=installations-amazon-eks-integration[Kubecost - Architecture Overview] to understand how Kubecost works on Amazon EKS.
27
+
* If you are new to Amazon EKS we recommend that you use Helm for the installation because it simplifies the _Amazon EKS optimized Kubecost bundle_ installation. For more information, see https://www.ibm.com/docs/en/kubecost/self-hosted/2.x?topic=installations-amazon-eks-integration#ariaid-title3[Deploying Kubecost on an Amazon EKS cluster using Amazon EKS add-on].
28
+
* For advanced users, you may configure your _Amazon EKS optimized Kubecost bundle_ with Helm. For more information, see https://www.ibm.com/docs/en/kubecost/self-hosted/2.x?topic=installations-amazon-eks-integration#ariaid-title8[Deploying Kubecost on an Amazon EKS cluster using Helm].
118
29
30
+
[#kubecost-access-dashbaard]
31
+
== Access Kubecost dashboard
119
32
120
-
* *Cost allocation* – View monthly Amazon EKS costs and cumulative costs for each of your namespaces and other dimensions over the past seven days. This is helpful for understanding which parts of your application are contributing to Amazon EKS spend.
121
-
* *Assets* – View the costs of the {aws} infrastructure assets that are associated with your Amazon EKS resources.
33
+
Once the _Amazon EKS optimized Kubecost bundle_ setup done, you should have access to Kubecost dashboard. For more information, see <<cost-monitoring-kubecost-dashboard>>.
0 commit comments