Where are the Kubernetes kubelet logs located for the AWS EKS Clusters?

11/1/2019

There are previous questions about Self managed Kubernetes clusters located here. But they don't cover the use case for Amazon Linux(AWS EKS provided AMIs) Where are the Kubernetes kubelet logs located?

Where are the kubelet logs for EKS nodes?

-- einarc
amazon-eks
aws-eks
eks
kubelet
kubernetes

1 Answer

11/1/2019

The answer for the kubelet EKS use case is: /var/log/messages in the AWS Linux AMI

You can determine this yourself by checking the AWS documentation when asking for Customer Support:

This is how to get to kubelet logs Read the troubleshooting guide, specifically the CNI Log Collection Tool section.

AWS EKS Troubleshooting

AWS has a CNI support tool installed in their EKS AMI liste in the documentation above as being at:

/opt/cni/bin/aws-cni-support.sh

Go through that script and find these lines:

# collect kubelet log
cp /var/log/messages $LOG_DIR/

This will allow you to determine how AWS collects the kubelet logs and come up with the file listed above.

-- einarc
Source: StackOverflow