AWS Cloud
For AWS Prometheus to be effectively configured and to ensure a smooth monitoring experience, it's crucial to follow the right steps and have the necessary prerequisites in place:
- AWS Account Credentials: Specifically, the accessKey and secretKey from the account that created the cluster.
- Helm: A vital tool for managing Kubernetes charts.
- Kubectl: Ensure you're using version 1.18.15 or later. Get the right version here.
- AWS CLI: If you haven't installed it, follow these instructions.
Procedure
- Configure AWS Account: Open your terminal and enter aws configure to set up your AWS account. To double-check your settings, use aws sts get-caller-identity.
- Establish a Namespace: Create a dedicated namespace for Prometheus with this command: kubectl create namespace prometheus.
- Include Prometheus Repository: Add the Prometheus community chart repository using: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts.
- Deploy Prometheus: Use the following command to deploy Prometheus: helm upgrade -i prometheus prometheus-community/prometheus --namespace prometheus --set alertmanager.persistentVolume.storageClass="gp2",server.persistentVolume.storageClass="gp2"
- Check Your Pods: Verify if all the pods within the Prometheus namespace are ready using: kubectl get pods -n prometheus.
- Forward the Prometheus Console: To make your Prometheus console accessible from your local machine, use: kubectl --namespace=prometheus port-forward deploy/prometheus-server 9090.
- Access the Console: Open your browser and go to localhost:9090 to view the Prometheus console.
- Dive Deeper: If you're looking for a more detailed guide, consider visiting the official AWS documentation on Prometheus.