contains all necessary details to create EC2 instances that will host Grafana and/or metric collectors.
contains the Terraform configuration to create EC2 instances for the monitoring system. terraform init terraform apply -var="key_name=kubekey"
contains Ansible playbooks to install and configure the necessary monitoring tools on the EC2 instances. ansible-playbook -i inventory.ini action.yml
- Create an EC2 instance named Monitor_Sys using Terraform.
- Using Ansible, install Prometheus exporters (for example node_exporter, and kube-state-metrics where appropriate) on the EC2 instance(s) that will collect metrics from the Kubernetes cluster.
- Configure Prometheus (or make sure Prometheus scraping is configured) so the exporters expose node/pod metrics.
- Deploy Grafana (on Monitor_Sys) and import/create dashboards to display the collected metrics.
- Ensure firewall/security groups allow required ports (node_exporter: 9100, Prometheus: 9090, Grafana: 3000) and that Prometheus can reach the exporters and scrape targets.
Since it bound inside to cluster we need a nodePort
to see all svs inside argocd - kubectl -n argocd get svc
just to see what inside - kubectl -n argocd edit svc argocd-server-metrics
run below code after argo cd deployment -
kubectl -n argocd patch svc argocd-server-metrics
-p '{"spec":{"type":"NodePort","ports":[{"name":"metrics","port":8083,"targetPort":8083,"nodePort":32083}]}}'
32083 will be the port exposing