enable-prometheus-in-cloudwatch
enable
CLUSTER_NAME=ekscluster1
eksctl create iamserviceaccount \
--cluster ${CLUSTER_NAME} \
--namespace amazon-cloudwatch \
--name cwagent-prometheus \
--attach-policy-arn arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy \
--override-existing-serviceaccounts \
--approve
output=prom.yaml
curl -o $output 'https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-eks.yaml'
sed -i 's;amazon/cloudwatch-agent;public.ecr.aws/cloudwatch-agent/cloudwatch-agent;' $output
kubectl apply -f $output
reference