Configure Kubernetes Monitoring on an AWS EKS Cluster
You can configure Kubernetes Monitoring on your EKS Cluster, either using the AWS console or the AWS CLI.
Before you begin
Before you begin, complete the following steps:
Subscribe to Grafana Cloud Kubernetes Monitoring on the AWS Marketplace, and follow the on-screen instructions.
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
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 (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:
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>'
Install using AWS EKS console
Once the secret has been deployed, you can use the AWS Console to deploy the EKS Add-on:
- On the AWS Console, navigate to your EKS Cluster list.
- Click the Cluster you want to use.
- Select the Add-ons tab.
- Click the Get more Add-ons button.
- Find the Grafana Cloud Kubernetes Monitoring add-on, and select the box. The Configure selected add-ons settings page appears.
- Select the version of the add-on.
- Click Next. The Review and add page appears
- Click Create.
Install using AWS CLI
Alternatively, you can 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:
aws eks create-addon --cluster-name ${CLUSTER_NAME} --region ${CLUSTER_REGION} --addon-name grafana-labs_kubernetes-monitoring
Validate data is flowing
- Navigate to Kubernetes Monitoring on your Grafana Cloud account.
- 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.