简体   繁体   English

Amazon Kubernetes AWS-EKS未正确创建或未与kubectl同步

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

Following this document step by step: 按照本文档一步一步:

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

I created EKS cluster using aws cli instead-of UI. 我使用aws cli而不是UI创建了EKS集群。 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 但是,当我按照这个开始并将Worker节点与集群关联时,我得到了

proxy-kube$ kubectl get nodes 
No resources found.

I can see 3 EC2 instances created and running in AWS console (UI). 我可以看到在AWS控制台(UI)中创建并运行了3个EC2实例。 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 但是,如果我尝试访问EXTERNAL-IP,它会显示

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 还尝试获取kashnetes的Dashboard,但它无法在127.0.0.1:8001上显示任何内容

Does anyone know what might be going wrong? 有谁知道可能会出错? Any help on this is appreciated. 对此有任何帮助表示赞赏。

Thanks 谢谢

Looks you your kubelet (your node) is not registering with the master. 看你的kubelet(你的节点)没有向主人注册。 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: 你可以ssh到其中一个节点并检查kubelet中的日志,如下所示:

journalctl -xeu kubelet

Also, it would help to post the output of kubectl describe deployment <deployment-name> and kubectl get pods 此外,它将有助于发布kubectl describe deployment <deployment-name>kubectl get pods

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM