Today, we are talking about EKS cluster and related issue about EKS worker nodes.
After creating the EKS cluster and worker, we are excited to see our worker nodes status by kubectl get node
. However, you may see No resources found
return by the command:
AWS premium support blog has a great article which discuss each part you need to check to see if there is anything wrong:
https://aws.amazon.com/premiumsupport/knowledge-center/eks-worker-nodes-cluster/
Instead of issuing a support ticket to AWS Support, we can troubleshoot the issue by ourselves. There is a log collector called EKS Logs Collector
open sourced in EKS AMI repo. If you are using EKS optimized Amazon Linux 2 AMI or Windows, we can use this log collector to collect necessary logs from EKS worker nodes to identify the root cause of the issue.
The steps to collect logs :
- ssh into the worker node
- Run this project as the root user:
$ curl -O https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/log-collector-script/linux/eks-log-collector.sh
$ sudo bash eks-log-collector.sh
Use tar zxvf /var/log/eks_i-0670341186c49aa57_2021-09-16_1629-UTC_0.6.2.tar.gz
to uncompress the file
We may find more information when check the kubelet.log
[ec2-user@ip-192-168-52-78 ~]$ ls
cni containerd docker eks-log-collector.sh ipamd kernel kubelet networking sandbox-image storage sysctls system var_log
[ec2-user@ip-192-168-52-78 ~]$ cd kubelet/
[ec2-user@ip-192-168-52-78 kubelet]$ ls
kubeconfig.yaml kubelet.log kubelet_service.txt
Next part, I would show you what you would see when encounter each issue in kubelet.log
Need more time to finish this article :)
Top comments (0)