Amazon Kubernetes AWS-EKS未正确创建或未与kubectl同步 [英] Amazon Kubernetes AWS-EKS is not getting created properly or not synched with kubectl

查看:231
本文介绍了Amazon Kubernetes AWS-EKS未正确创建或未与kubectl同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

逐步遵循此文档:

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

我使用aws cli而不是UI创建了EKS集群.所以我得到以下输出

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

但是当我按照此入门指南并将Worker节点与集群相关联时,我会得到

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.

我可以看到在AWS控制台(UI)中创建并运行了3个EC2实例. 但是我什至无法部署和运行Guestbook应用程序. 部署应用程序时,我得到以下信息:

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>

但是,如果我尝试访问EXTERNAL-IP,它将显示

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

服务器无法访问

server is not reachable

在浏览器中.

还尝试获取用于kubernetes的仪表板,但它在127.0.0.1:8001上无法显示任何内容

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.

谢谢

推荐答案

看起来您的kubelet(您的节点)未在主服务器上注册.如果您没有任何节点,那么基本上您将无法运行任何东西.

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.

您可以将ssh放入一个节点中,并使用以下方法检查kubelet中的日志:

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

journalctl -xeu kubelet

此外,这将有助于发布kubectl describe deployment <deployment-name>kubectl get pods

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

这篇关于Amazon Kubernetes AWS-EKS未正确创建或未与kubectl同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆