- Newest
- Most votes
- Most comments
To reduce the resource requests and limits for DaemonSets created by the AWS CloudWatch Observability add-on in your EKS cluster, you have a few options:
- Update the DaemonSet configuration file: You can extract the current DaemonSet configuration, modify the resource settings, and apply the changes. For example:
kubectl get pod cloudwatch-agent-xyz123 -n amazon-cloudwatch -o yaml | grep -A10 'resources:'
Then update the resources section in the DaemonSet YAML file with lower values:
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 200m
memory: 400Mi
And apply the changes:
kubectl apply -f cloudwatch-agent-daemonset.yaml
-
Use the conflict resolution option: When installing or updating the CloudWatch Observability EKS add-on, you can use the conflict resolution configuration option with "OVERWRITE" parameter. This allows you to proceed with customized settings by overwriting the conflicts on the cluster. In the Amazon EKS console, you'll find this under "Optional configuration settings" when creating or updating the add-on. If using AWS CLI, you can add the
--resolve-conflicts OVERWRITEparameter to your command. -
Remove existing setup and reinstall: If you're experiencing issues with the current setup, you can delete the existing CloudWatch agent setup from your cluster, back up any customizations you've made, and then reinstall the EKS add-on with your preferred resource settings. Make sure to back up any custom agent configurations before doing this.
-
Use node labels to control DaemonSet deployment: You can use node labels and the NodeAffinity setting to control which nodes the DaemonSets run on, potentially avoiding deployment on smaller nodes where resources are more constrained.
Remember to monitor your pods after making these changes to ensure they're not entering a CrashLoopBackOff state due to insufficient resources. You can use tools like kubectl top pods to monitor resource usage and further adjust your settings as needed.
Sources
Resolve CrashLoopBackOff state for pods in Amazon EKS cluster | AWS re:Post
How to monitor high resource usage in Amazon EKS tasks and services | AWS re:Post
Kubernetes Control Plane - Amazon EKS
Troubleshooting your Application Signals installation - Amazon CloudWatch
Relevant content
- AWS OFFICIALUpdated a year ago
