This workshop has been deprecated and archived. The new Amazon EKS Workshop is now available at www.eksworkshop.com.
First we are going to install Prometheus. In this example, we are primarily going to use the standard configuration, but we do override the storage class. We will use gp2 EBS volumes for simplicity and demonstration purpose. When deploying in production, you would use io1 volumes with desired IOPS and increase the default storage size in the manifests to get better performance. Run the following command:
kubectl create namespace prometheus helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm install prometheus prometheus-community/prometheus \ --namespace prometheus \ --set alertmanager.persistentVolume.storageClass="gp2" \ --set server.persistentVolume.storageClass="gp2"
Make note of the prometheus endpoint in helm response (you will need this later). It should look similar to below:
The Prometheus server can be accessed via port 80 on the following DNS name from within your cluster: prometheus-server.prometheus.svc.cluster.local
Check if Prometheus components deployed as expected
kubectl get all -n prometheus
You should see response similar to below. They should all be Ready and Available
In order to access the Prometheus server URL, we are going to use the kubectl port-forward command to access the application. In Cloud9, run:
kubectl port-forward -n prometheus deploy/prometheus-server 8080:9090
In your Cloud9 environment, click Tools / Preview / Preview Running Application. Scroll to the end of the URL and append:
In the web UI, you can see all the targets and metrics being monitored by Prometheus: