Even there is no perfect solution to deploy Kubernetes on AWS at the moment, not as fast and easy as GKE, once configured, it becomes quite easy to administer. Also, in GKE, you have a integrated monitoring solution using Stackdriver.
In AWS, there are many options to deploy, manage and monitor the cluster, unfortunately all of them require some additional steps to get a complete solution.
After comparing different tools for monitoring the Kubernetes clusters we found Prometheus to be the best choice which also does not require too much configuration to get a basic monitoring solution and has great integration with Grafana.
So we created a stack that deploys Prometheus, Alertmanager, Node Exporter, Kube State Metrics and Grafana in a kubernetes cluster in under one minute.
The stack is available on GitHub
- Prometheus v2.X.X
- InCluster deployment using a
StatefulSetfor persistent storage
- auto-discovery for services and pods annotated with
- automatic configuration for RBAC
- preconfigured alerts
- preconfigured Grafana dashboards
- easy to setup; usually less than a minute to deploy a basic monitoring solution for Kubernetes
- support for Kubernetes v1.6.0 and up
One minute deployment
- Kubernetes cluster and
- Security Groups configured to allow port 9100/TCP for
prometheus node-exporterand 10250/TCP for k8s nodes metrics.
- SMTP Account for email alerts
- Token for alerts on Slack
- A IAM Role with EC2 ReadOnly access for EC2 instances monitoring. Only required for monitoring AWS nodes that are not part of the kubernetes cluster
git clone github.com/camilb/prometheus-kubernetes && cd prometehus-kubernetes
Make any desired configuration changes in
configmaps according to your setup.
Deploy Prometheus, Alertmaneger, Node Exporter, Grafana and Kube State Metrics
The init script will ask some basic questions and attempt to auto-discover information about your system.
Now you can access the dashboards locally using
kubectl port-forwardcommand, creating a ingress or a LoadBalancer. Please check the
./tools directory to quickly configure a ingress or proxy the services to localhost.
To remove everything, just execute the