update: Migrate Container Insights to the CloudWatch Observability add-on (OTel, drop ADOT) - #1904
update: Migrate Container Insights to the CloudWatch Observability add-on (OTel, drop ADOT)#1904JaviGG02 wants to merge 2 commits into
Conversation
…grate to CloudWatch Observability add-on (OTel), drop ADOT + refresh queries/screenshots Migrate the Container Insights on EKS lab from manually-deployed ADOT collectors to the Amazon CloudWatch Observability EKS add-on (OTel Container Insights): - Cluster metrics: enable the add-on via EKS Pod Identity (pod-identity-agent, IAM role with CloudWatchAgentServerPolicy, association, otelContainerInsights). - Application metrics: scrape Prometheus via the add-on's agent.otelConfig (prometheus receiver -> awsemf) instead of a dedicated ADOT collector; fix dashboard name to Order-Service-Metrics-1. - Log Analytics: add log-group selection tip and swap the container-restarts query for pod_memory_utilization. - Refresh screenshots. Signed-off-by: Javier Garcia <jxgarci@amazon.com>
✅ Deploy Preview for eks-workshop ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ith the add-on migration - Terraform: preinstall the eks-pod-identity-agent add-on (aws_eks_addon, resolve_conflicts_on_create=OVERWRITE) and keep the Order-Service-Metrics-1 dashboard; remove the OpenTelemetry operator, cert-manager and the ADOT IRSA role. - collect-metrics: note prepare-environment preinstalled the Pod Identity Agent; inline the IAM trust policy (no heredoc, works in the test harness). - Application metrics: move the add-on Prometheus config to a repo file referenced via ::yaml instead of an in-lab heredoc. - cleanup.sh: delete the observability add-on, Pod Identity association and the cloudwatch-agent IAM role; drop the opentelemetrycollectors cleanup. - tests: hook-install waits for eks-pod-identity-agent pods; remove hook-deploy-adot-ci.sh. Validated: make test module="observability/container-insights" -> 3 passing. Signed-off-by: Javier Garcia <jxgarci@amazon.com>
|
Just as a reference, make test output:
EKS Workshop 3 passing (12m) |
What this PR does / why we need it:
Migrates the Container Insights on EKS lab to the current recommended setup (part of #1895, item
3): from manually-deployed ADOT collectors to the Amazon CloudWatch Observability EKS add-on with
OTel Container Insights, following the [AWS
quickstart](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/container-insights-eks-otel-
quickstart.html). ADOT is no longer referenced in the chapter — the content explains that the
CloudWatch agent uses OpenTelemetry under the hood. This PR updates both the content and the lab
preparation (Terraform/cleanup/tests) so the module is consistent and passes automated testing.
Content
collect-metrics-adot-ci.md): replaced the hand-deployed ADOT DaemonSetcollector with the
amazon-cloudwatch-observabilityadd-on, granting the CloudWatch agent permissionsvia EKS Pod Identity — create an IAM role (trust
pods.eks.amazonaws.com) withCloudWatchAgentServerPolicy, associate it with thecloudwatch-agentservice account, then enablethe add-on with
otelContainerInsights. The EKS Pod Identity Agent is preinstalled byprepare-environment. Verification checks thecloudwatch-agentpods in theamazon-cloudwatchnamespace.
visualize-application-metrics-cloudwatch.md): replaced the second(Prometheus) ADOT collector with the CloudWatch agent's Prometheus scraping, configured through the
add-on's
agent.otelConfig(Prometheus receiver →awsemfexporter to theContainerInsights/Prometheusnamespace). The scrape runs on the add-on's single-replica clusterscraper, so no separate collector or IAM role is needed. Fixed the dashboard name to
Order-Service-Metrics-1to match the resource that is actually created.logs-insights.md): added a tip to select the/aws/containerinsights/eks-workshop/performancelog group before running a query, and replaced thecontainer-restarts example query (no data when no restarts occurred) with a
pod_memory_utilizationquery that always has data.
index.md: updated the "Before you start" summary to match the new flow.Lab preparation (Terraform / cleanup / tests)
prepare-environmentnow installs theeks-pod-identity-agentadd-on(
aws_eks_addon,resolve_conflicts_on_create=OVERWRITE) and keeps theOrder-Service-Metrics-1dashboard; the OpenTelemetry operator, cert-manager and the ADOT IRSA role are removed.
cloudwatch-agentIAM role so the module is re-runnable; dropped theopentelemetrycollectorscleanup.
hook-install.shwaits for theeks-pod-identity-agentpods; removed the obsoletehook-deploy-adot-ci.sh.(
cwagent-prometheus/cloudwatch-agent-prometheus.yaml) referenced via::yaml, rather than an in-labheredoc.
Which issue(s) this PR fixes:
Part of #1895
Quality checks
make test module="observability/container-insights"and it was successful (seehttps://github.com/aws-samples/eks-workshop-v2/blob/main/docs/automated_tests.md)
workshop release notes
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this
contribution, under the terms of your choice.