Listen to this Post
Using Elastic Kubernetes Service (EKS) on AWS, you can set up monitoring tools to keep an eye on everything. Tools like Grafana and Prometheus can be set up manually, or you can use managed versions provided by AWS, which handle most of the work for you. While managed versions come with a cost, they can be worth it for many teams. This article by Siva Guruvareddiar and Michael Hausenblas demonstrates how to set these up with your EKS cluster.
URL: Enhancing observability with a managed monitoring solution for Amazon EKS | Amazon Web Services
Practice Verified Codes and Commands:
1. Install Prometheus on EKS:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm install prometheus prometheus-community/prometheus
2. Install Grafana on EKS:
helm repo add grafana https://grafana.github.io/helm-charts helm repo update helm install grafana grafana/grafana
3. Access Grafana Dashboard:
kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo kubectl port-forward service/grafana 3000:80
Open your browser and go to `http://localhost:3000`.
4. Set Up AWS Managed Prometheus:
aws amp create-workspace --alias eks-monitoring
5. Configure Prometheus to Use AWS Managed Service:
remote_write: - url: https://aps-workspaces.us-west-2.amazonaws.com/workspaces/ws-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/api/v1/remote_write sigv4: region: us-west-2
6. Deploy Grafana with AWS Managed Prometheus:
helm upgrade --install grafana grafana/grafana \ --set persistence.enabled=true \ --set service.type=LoadBalancer \ --set datasources."datasources.yaml".apiVersion=1 \ --set datasources."datasources.yaml".datasources[0].name=Prometheus \ --set datasources."datasources.yaml".datasources[0].type=prometheus \ --set datasources."datasources.yaml".datasources[0].url=http://prometheus-server.default.svc.cluster.local \ --set datasources."datasources.yaml".datasources[0].access=proxy
What Undercode Say:
Enhancing observability in your Amazon EKS cluster is crucial for maintaining the health and performance of your applications. By leveraging tools like Prometheus and Grafana, you can gain deep insights into your cluster’s metrics and logs. AWS offers managed versions of these tools, which can significantly reduce the operational overhead, allowing your team to focus on developing and deploying applications rather than managing infrastructure.
To get started, you can install Prometheus and Grafana using Helm charts, which simplifies the deployment process. Once installed, you can access the Grafana dashboard to visualize your metrics. For a more seamless experience, consider using AWS Managed Prometheus, which integrates directly with your EKS cluster and provides a scalable solution for monitoring.
Additionally, configuring Prometheus to remote write to AWS Managed Prometheus ensures that your metrics are stored securely and can be accessed from anywhere. Deploying Grafana with AWS Managed Prometheus as a data source allows you to create comprehensive dashboards that provide real-time insights into your cluster’s performance.
For further reading, you can explore the official AWS documentation on setting up monitoring solutions for EKS. The combination of these tools and practices will empower your team to maintain a robust and observable Kubernetes environment, ensuring that any issues are detected and resolved promptly.
Useful URLs:
References:
Hackers Feeds, Undercode AI