Prerequisites :
- eksctl
- kubectl
- aws cli
- helm
./eks.sh build
- this command will run :
eksctl create cluster --name=eks-cluster \
--region=ap-south-1 \
--nodegroup-name=my-nodes \
--node-type=t3.medium \
--managed \
--nodes=2 \
--nodes-min=2 \
--nodes-max=3
helm repo add stable https://charts.helm.sh/stable
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm install stable prometheus-community/kube-prometheus-stack -n prometheus
kubectl get svc -n prometheus
- to attach the load balancer we need to change from ClusterIP to LoadBalancer command to get the svc file:
kubectl edit svc stable-kube-prometheus-sta-prometheus -n prometheus
kubectl edit svc stable-grafana -n prometheus
kubectl get svc -n prometheus stable-grafana
kubectl get secret --namespace prometheus stable-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
./eks.sh delete
- this command will run:
eksctl delete cluster --name eks-cluster