AWS Distro for Open Telemetry
Last updated
Last updated
This guide will walk you through the steps to deploy Kubecost with AWS Distro for Open Telemetry (ADOT) to collect metrics from your Kubernetes clusters utilizing the EKS-Optimized
license.
Kubecost EKS-Optimized
allows for 15 days of query history. Unlock unlimited history with Kubecost Enterprise.
An AWS Managed Prometheus Workspace is required to use ADOT
AWS IAM permissions to add permissions for Kubecost to read from the workspace
Before following this guide, make sure you've reviewed AWS' Set up metrics ingestion using AWS Distro for Open Telemetry on an Amazon Elastic Kubernetes Service cluster to enable the ADOT collector daemonSet.
This guide assumes that the Kubecost Helm release name and the Kubecost namespace have the same value (usually this will be kubecost
), which allows a global find and replace on YOUR_NAMESPACE
.
Clone this repository that contains all of the configuration files you will need to deploy Kubecost with ADOT.
Update all configuration files with your cluster name (replace all instances of YOUR_CLUSTER_NAME_HERE
). The examples use cluster_id
for the key of the key:value pair for the cluster name. You can use any key you want, including what is likely already being used.
There are many options for deploying the ADOT daemonSet. At a minimum, Kubecost needs the provided scrape config to be added to the ADOT Prometheus ConfigMap. This sample ConfigMap also contains cAdvisor metrics, which is required by Kubecost.
Alternatively, you can add these items to your existing ConfigMap.
For the Kubecost scrape_configs
job, honor_labels: true
must be set. Without this, you will likely only see the kube-system
or kubecost
namespace in the UI.
Create the Kubecost namespace:
Create the AWS IAM policy to allow Kubecost to query metrics from AMP:
(Optional) Create the AWS IAM policy to allow Kubecost to find savings in the AWS Account:
(Optional) Create the AWS IAM policy to allow Kubecost to write to find account-level tags:
Configure the Kubecost Service Account:
Install Kubecost:
This assumes you have created the IAM policies above. If using multiple AWS accounts, you will need to create the policies in each account (section titled Kubecost AWS IAM setup).
Create the Kubecost namespace:
Configure the Kubecost Service Account:
Deploy the Kubecost agent:
See this example .yaml file for an all-in-one ADOT DS config.
For more help troubleshooting, see our Amazon Managed Service for Prometheus (AMP) Overview doc.