- adot IAM service account
- adot-collector
Create adot iamserviceaccount
eksctl create iamserviceaccount \--cluster btcluster \--region eu-west-2 \--namespace fargate-container-insights \--name adot-collector \--attach-policy-arn arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy \--override-existing-serviceaccounts \--approve
in-case of deleting iamserviceacount
eksctl delete iamserviceaccount --cluster btcluster --name adot-collector -n fargate-container-insights
Deploy Adot-collector
wget https://github.com/punitporwal07/kubernetes/blob/master/monitoring/cloudwatch-insight/eks-fargate-container-insights.yamlkubectl apply -f eks-fargate-container-insights.yaml
Create compute fargate profile for the adot-collector pod that comes with statefulset
eksctl create fargateprofile --name adot-collector --cluster btcluster -n fargate-container-insights
services > cloudWatch > logs > log groups & search for insight
services > cloudWatch > insights > Container insights > container map
Some helpful commands
to scale down statefulset -
kubectl -n fargate-container-insights patch statefulset.apps/adot-collector -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}'
to scale up statefulset -
kubectl -n fargate-container-insights patch statefulset.apps/adot-collector --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]'