Amazon-vpc-cni-k8s: Unable to access logs

Created on 25 Feb 2019  路  4Comments  路  Source: aws/amazon-vpc-cni-k8s

I created a cluster with 2 worker nodes using 10.0.0.0/16 address.

I am configured an external machine with Kubeconfig. I am able to run all the regular kubectl commands except for logs I see the following

kubectl logs -p kube-proxy-9pgvg
Error from server: Get https://10.0.1.12:10250/containerLogs/kube-system/kube-proxy-9pgvg/kube-proxy?previous=true: dial tcp 10.0.1.12:10250: connect: connection refused

I tried used the latest EKS ami : amazon-eks-node-1.11-v20190220

See a similar issue with older EKS as well : amazon-eks-node-v24

Most helpful comment

@rkatti - It looks like the userdata section of worker nodes in the terraform script is out dated. EKS optimized's AMI now has a bootstrap.sh script would bootstrap your Worker Nodes to join the cluster.

Ref: https://github.com/awslabs/amazon-eks-ami/blob/master/files/bootstrap.sh

Please update you your terraform template to have something similar - https://github.com/terraform-aws-modules/terraform-aws-eks/blob/21f43b83415a84e0804c2c5e1fe3e86c81e281da/templates/userdata.sh.tpl#L7 which would solve your issue.

All 4 comments

fyi I am using terraform to build EKS with scripts listed here : https://github.com/WesleyCharlesBlake/terraform-aws-eks/tree/master/modules/eks

@rkatti - It looks like the userdata section of worker nodes in the terraform script is out dated. EKS optimized's AMI now has a bootstrap.sh script would bootstrap your Worker Nodes to join the cluster.

Ref: https://github.com/awslabs/amazon-eks-ami/blob/master/files/bootstrap.sh

Please update you your terraform template to have something similar - https://github.com/terraform-aws-modules/terraform-aws-eks/blob/21f43b83415a84e0804c2c5e1fe3e86c81e281da/templates/userdata.sh.tpl#L7 which would solve your issue.

thanks @nithu0115 will try it out

that worked ...

Was this page helpful?
0 / 5 - 0 ratings