Amazon Kubernetes AWS-EKS is not getting created properly or not synched with kubectl

走远了吗. 提交于 2019-12-10 17:19:21

问题


Following this document step by step:

https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html?shortFooter=true

I created EKS cluster using aws cli instead-of UI. So I got the following output

proxy-kube$ kubectl get svc 
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.100.0.1   <none>        443/TCP   18h

But when I am following this getting started and associating Worker nodes with the cluster, I get

proxy-kube$ kubectl get nodes 
No resources found.

I can see 3 EC2 instances created and running in AWS console (UI). But I am unable to deploy and run even Guestbook application. When I deploy application, I get following:

~$ kubectl get services -o wide
NAME           TYPE           CLUSTER-IP       EXTERNAL-IP                                                               PORT(S)          AGE       SELECTOR
guestbook      LoadBalancer   10.100.46.244    a08e89122c10311e88fdd0e3fbea8df8-1146802048.us-east-1.elb.amazonaws.com   3000:32758/TCP   17s       app=guestbook
kubernetes     ClusterIP      10.100.0.1       <none>                                                                    443/TCP          21h       <none>
redis-master   ClusterIP      10.100.208.141   <none>                                                                    6379/TCP         1m        app=redis,role=master
redis-slave    ClusterIP      10.100.226.147   <none>

But if I try to access EXTERNAL-IP, It shows

server is not reachable

in browser.

Also tried to get Dashboard for kubernetes but it failed to show anything on 127.0.0.1:8001

Does anyone know what might be going wrong? Any help on this is appreciated.

Thanks


回答1:


Looks you your kubelet (your node) is not registering with the master. If you don't have any nodes basically you can't run anything.

You can ssh into one of the nodes and check the logs in the kubelet with something like this:

journalctl -xeu kubelet

Also, it would help to post the output of kubectl describe deployment <deployment-name> and kubectl get pods



来源:https://stackoverflow.com/questions/52542933/amazon-kubernetes-aws-eks-is-not-getting-created-properly-or-not-synched-with-ku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!