- Newest
- Most votes
- Most comments
The issue you're experiencing with the GuardDuty agent version 1.10.0 failing to start while version 1.8.1 works correctly appears to be related to an access permission problem, as indicated by the "AccessDeniedException" error in your logs.
Here are some troubleshooting steps to resolve this issue:
-
VPC Endpoint Configuration: When managing the GuardDuty agent manually, you need to create a VPC endpoint as a prerequisite. This endpoint helps GuardDuty receive runtime events from your EKS cluster. Verify that your VPC endpoint is properly configured and accessible from your EKS nodes.
-
Admission Controller Configuration: Before updating to a newer agent version (like 1.10.0), you need to add the GuardDuty image registry to the
allowed-container-registriesin your admission controller. The error might be occurring because your admission controller is blocking the new agent version. -
Resolve Conflicts: If you're seeing configuration conflicts when updating the addon, you might need to use the
OVERWRITEresolve conflict flag. This will overwrite any changes made directly to the related resources in Kubernetes. -
Security Policies: Review any security policies that might be blocking the addon update. You may need to either disable the controller (webhook) or configure the controller to accept requests from Amazon EKS.
-
Network Connectivity: Ensure that the required network connectivity is available between your EKS nodes and the GuardDuty service. The "AccessDeniedException" suggests that the agent cannot communicate with the GuardDuty service properly.
If the issue persists, you might want to consider removing the Amazon EKS add-on from your cluster and then reinstalling it with the desired version. This approach can help resolve configuration conflicts that might be preventing the newer agent version from starting correctly.
Sources
Runtime coverage and troubleshooting for Amazon EKS clusters - Amazon GuardDuty
GuardDuty security agent release versions - Amazon GuardDuty
Managing security agent manually for Amazon EKS cluster - Amazon GuardDuty
I encountered the same issue as described by OP when upgrading the GuardDuty addon.
To further debug this issue, you can increase the log level for the AWS GuardDuty pod to identify the root cause. To enable debug logging, update the aws-guardduty-agent DaemonSet with an additional environment variable for the container:
- name: RUST_LOG
value: debug
This revealed the following error:
User: arn:aws:sts::123456789:assumed-role/aws:ec2-instance/i-yyyyyyyyyy is not authorized to perform: guardduty:SendSecurityTelemetry on resource: arn:aws:guardduty:us-east-1:123456789:detector/zzzzzzzzzzzzzzzzz with an explicit deny in a VPC endpoint policy
After seeing this error, I discovered that I had incorrectly used the condition "aws:Principal" instead of the correct "aws:PrincipalAccount" as documented in:
https://docs.aws.amazon.com/guardduty/latest/ug/eksrunmon-prereq-deploy-security-agent.html
answered 10 months ago
Relevant content
asked 2 years ago
