Configuring AWS Container Insights

CloudZero accesses your container metrics by leveraging AWS's Container Insights which pulls performance data into a CloudWatch log that our platform will ingest.

We are fully compatible with any customer who has all of Container Insights installed. If you'd like to only install the pieces that are necessary to view your container costs in CloudZero, this guide will help you configure things correctly.

Minimal Container Insights installation

CloudZero only requires the performance log group, which is generated by the CloudWatch Agent. To install only this agent, follow these steps:

  1. Verify that your worker nodes can write to CloudWatch Logs, by following AWS's prerequisite steps
  2. Deploy the CloudWatch Agent by following [AWS's installation steps].(https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-setup-metrics.html) These instructions deploy the CloudWatch Agent which writes performance data about your cluster to the performance log group and custom metrics.

At this point, all necessary resources exist within your AWS account. If your IAM permissions are setup correctly for CloudZero to pull this log data, then within 24 hours you be able to explore your container costs by cluster, namespace, and pod.

Reducing Container Insights costs

The CloudWatch Agent will produce both a performance log group and a set of corresponding custom metrics, while CloudZero only requires the data inside the performance log group. To avoid this extra expense, we offer a means of configuring the CloudWatch agent to turn off these custom metrics. Instructions for that can be found here.

Removing unneeded log streams

If you already have a centralized logging solution, the logging feature of Container Insights is contained within the fluentd-cloudwatch DaemonSet and can be removed by running the following command:

kubectl delete daemonset fluentd-cloudwatch -n amazon-cloudwatch

Note that this fluentd-cloudwatch DaemonSet is not installed as part of the "Minimal Container Insights installation" instructions.