How can I generate a log bundle for my Amazon EKS instances?
I'm troubleshooting an Amazon Elastic Kubernetes Service (Amazon EKS) instance. I need to collect all the relevant Amazon EKS logs associated with that instance.
"I'm troubleshooting an Amazon Elastic Kubernetes Service (Amazon EKS) instance. I need to collect all the relevant Amazon EKS logs associated with that instance.Short descriptionUse the AWSSupport-CollectEKSInstanceLogs automation document to collect your Amazon EKS logs.Important: For the automation to work, you must install and run the SSM Agent on your Amazon EKS instance.ResolutionNote: The following resolution works only for worker nodes in Amazon EKS for Linux.1.    Open the AWS Systems Manager console.2.    In the navigation pane, choose Automation.3.    Choose Execute automation.4.    On the Owned by Amazon tab, in the Automation document search box, enter EKSInstanceLogs. Then, select the AWSSupport-CollectEKSInstanceLogs document.5.    Choose Next.6.    On the Automation Inputs page, for EKSInstanceId, enter your target Amazon EKS instance ID.7.    Set the LogDestination and AutomationAssumeRole parameters.Note: The log bundle is uploaded to the Amazon Simple Storage Service (Amazon S3) bucket that's specified in the LogDestination field. If you didn't specify a bucket, then you can retrieve the log bundle from the instance. The log bundle is saved locally in the /var/log/ path.8.    Choose Execute automation.When you run the above automation document, note the following best practices and requirements:It's a best practice to attach the Amazon managed AmazonSSMManagedInstanceCore policy to the relevant AWS Identity and Access Management (IAM) role. This IAM role is for the Amazon Elastic Compute Cloud (Amazon EC2) instance that's targeted for automation.If you provide the S3 bucket name in the LogDestination field before the automation runs, then the instance profile can write to the bucket.To run the automation and send the command to the instance, you must have at least the ssm:ExecuteAutomation and ssm:SendCommand permissions.To read the automation output, you must have the ssm:GetAutomationExecution permission.Related informationConfigure instance permissions for Systems ManagerEKS Logs Collector (GitHub)Follow"