Configure the Kubernetes Monitoring EKS Add-on on an AWS EKS Cluster
Grafana Cloud

Configure the Kubernetes Monitoring EKS Add-on in an AWS EKS Cluster

You can configure Kubernetes Monitoring on your EKS Cluster either, either using the AWS console or the AWS CLI. You can configure with or without customizations to Kubernetes Monitoring.

Before you begin

Before you begin, complete the following steps:

  1. Subscribe to Grafana Cloud Kubernetes Monitoring on the AWS Marketplace, and follow the on-screen instructions.

  2. Create a new access policy token or use an existing token. Refer to Grafana Cloud Access Policies for more information.

    The access policy must have the following scopes:

    • metrics:read
    • metrics:write
    • logs:write
    • traces:write
  3. Gather the hostnames and username for your Grafana Cloud hosted Prometheus, Loki, and Tempo:

    To locate this information:

    • Go to grafana.com.
    • Click on My Account.
    • Select your organization from the Organization drop-down.
    • Select Details on the data source tile.
    • Locate the username (which should be numeric), and the hostname (without the path).

Deploy a secret with the Grafana Cloud connection details

For the EKS Add-on to know where to send the telemetry data, you must create a secret with the host, username, and password defined for each service.

Replace the <...> fields in the snippet below and deploy to your cluster:

yaml
apiVersion: v1
kind: Namespace
metadata:
  name: monitoring
---
apiVersion: v1
kind: Secret
metadata:
  name: grafana-cloud
  namespace: monitoring
stringData:
  prometheus-host: 'https://<PROMETHEUS INSTANCE>.grafana.net'
  prometheus-username: '<PROMETHEUS USERNAME>'
  prometheus-password: '<ACCESS POLICY TOKEN>'
  loki-host: 'https://<LOKI INSTANCE>.grafana.net'
  loki-username: '<LOKI USERNAME>'
  loki-password: '<ACCESS POLICY TOKEN>'
  tempo-host: 'https://<TEMPO INSTANCE>.grafana.net:443'
  tempo-username: '<TEMPO USERNAME>'
  tempo-password: '<ACCESS POLICY TOKEN>'

Configure the EKS Add-on with no customizations

Complete the following steps to configure with no customizations.

Install using AWS EKS console

Use the AWS Console to deploy the EKS Add-on:

  1. On the AWS Console, navigate to your EKS Cluster list.
  2. Click the Cluster you want to use.
  3. Select the Add-ons tab.
  4. Click the Get more Add-ons button.
  5. Find the Grafana Cloud Kubernetes Monitoring add-on, and select the box. The Configure selected add-ons settings page appears.
  6. Select the version of the add-on.
  7. Click Next. The Review and add page appears
  8. Click Create.

Install using AWS CLI

Use the AWS CLI from your terminal to deploy the EKS Add-on. After the secret has been deployed, use a configured AWS CLI to run the following command:

bash
aws eks create-addon --cluster-name ${CLUSTER_NAME} --region ${CLUSTER_REGION} --addon-name grafana-labs_kubernetes-monitoring

Validate data is flowing

  1. Navigate to Kubernetes Monitoring on your Grafana Cloud account.
  2. Click Configuration on the main menu, then click the Metrics status tab. Your data becomes populated as the system components begin scraping and sending data to Grafana Cloud. This view shows the health of the different sources of metrics, logs, and events, as well as any applicable version numbers.
    Descriptions and statuses for each item chosen to be configured and whether they are online
    Metrics status tab with status indicators for one Cluster

Configure the EKS Add-on with customizations

The EKS Add-on utilizes the same technology as the Kubernetes Monitoring Helm chart. To customize your EKS Add-on deployment, you can use special version of the Helm chart’s values.yaml file. However, AWS EKS Add-ons require their configuration to be provided in JSON format.

Create a customization file

Create a values.yaml file with your customizations. This file can include almost any change that is supported by the Kubernetes Monitoring Helm chart v1 except for:

  • Cluster name
  • Destination URLs and authentication
  • Container image paths

Here is an example of a values.yaml file that changes the amount of metrics gathered by the Add-on:

yaml
metrics:
  alloy:
    metricsTuning:
      useIntegrationAllowList: true
  node-exporter:
    metricsTuning:
      useIntegrationAllowList: true
  cadvisor:
    metricsTuning:
      includeMetrics: ['container_memory_*']

Convert the values.yaml file to JSON format:

bash
yq eval --output-format json . values.yaml > values.json

Install using AWS EKS console

When installing the EKS Add-on using the AWS Console, you can provide the configuration values in the Optional configuration settings section:

  1. On the AWS Console, navigate to your EKS Cluster list.
  2. Click the Cluster you want to use.
  3. Select the Add-ons tab.
  4. Click the Get more Add-ons button.
  5. Find the Grafana Cloud Kubernetes Monitoring add-on, and select the box. The Configure selected add-ons settings page appears.
  6. Select the version of the add-on.
  7. Click the “Optional configuration settings” to reveal the Configuration values field.
  8. Paste the contents of the values.json file into the Configuration values field.
  9. Click Next. The Review and add page appears
  10. Click Create.

Install using AWS CLI with customizations

When installing the EKS Add-on using the AWS CLI, supply the configuration values with the --configuration-values argument:

bash
aws eks create-addon --cluster-name ${CLUSTER_NAME} --region ${CLUSTER_REGION} --addon-name grafana-labs_kubernetes-monitoring --configuration-values "$(cat values.json)"

Validate data is flowing

  1. Navigate to Kubernetes Monitoring on your Grafana Cloud account.
  2. Click Configuration on the main menu, then click the Metrics status tab. Your data becomes populated as the system components begin scraping and sending data to Grafana Cloud. This view shows the health of the different sources of metrics, logs, and events, as well as any applicable version numbers.
    Descriptions and statuses for each item chosen to be configured and whether they are online
    Metrics status tab with status indicators for one Cluster