Set variables in the OTEL collector’s kubernetes manifest file:
envsubst < kubernetes/adot/otel-container-insights-infra.yaml | sponge kubernetes/adot/otel-container-insights-infra.yaml
Install the OTEL collector to the EKS Cluster as a DaemonSet:
kubectl apply -f kubernetes/adot/otel-container-insights-infra.yaml
Check to see that the OTEL collector’s DaemonSet is running on each node:
kubectl get nodes
kubectl get pods -n aws-otel-eks -o wide
At this point the OTEL collector is installed and sending CloudWatch Insights metrics to CloudWatch. We can get Cloudwatch metrics URL by running following command:
echo "https://${AWS_REGION}.console.aws.amazon.com/cloudwatch/home?region=${AWS_REGION}#metricsV2:graph=~()"
Then select the Pod level metrics:
Filter to just CPU Utilization, and change the visualization to be of type Number. And you’ll have a dashboard of the deployed Pod’s CPU Utilization: