AWS EKS - kubectl logs [pod name]

9/28/2018

I have an EKS cluster running on AWS in us-east-1. I have three worker nodes running on us-east-1a, 1b, 1c respectively. All the pods running in us-east-1a allow me to login and check logs but the pods in other zones keep throwing an error:

Error from server: no preferred addresses found; known addresses: []

Any help appreciated. Basically using this setup for sharding mongodb in various zones.

-- Deepan Verma
amazon-eks
amazon-web-services
kubectl
kubernetes
mongodb

1 Answer

5/23/2019

In all workers

1) Edit the file:

/etc/systemd/system/kubelet.service.d/10-kubeadm.conf

Add or update:

Environment="KUBELET_EXTRA_ARGS=--node-ip='private-ip-value'"

For eg: Environment="KUBELET_EXTRA_ARGS=--node-ip=172.31.55.201"

2) systemctl daemon-reload

3) systemctl restart kubelet

-- bighnaraj mishra
Source: StackOverflow