Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl get nodes 返回No resources found #22

Open
a1004201125 opened this issue Dec 11, 2022 · 4 comments
Open

kubectl get nodes 返回No resources found #22

a1004201125 opened this issue Dec 11, 2022 · 4 comments

Comments

@a1004201125
Copy link

使用命令 kubectl get cs 和 kubectl gt csr 返回正常,而到了 kubectl get nodes 的时候,返回 No resources found. 检查kubelet的状态,提示: "Unable to register node with API server" err="nodes is forbidden: User "system:anonymous" cannot create resource "nodes" in API group "" at the cluster scope" node="master2"
kube-controller-manager提示: No authentication-kubeconfig provided in order to lookup client-ca-file in configmap/extension-apiserver-authentication in kube-system, so client certificate authentication won't work.

@mrzhu147
Copy link

证书文件看上去没有下发成功,检查下master2的ansible变量配置试试

@MiracleTanC
Copy link

v1.27.1,走到8.2.5查看集群了,kubectl get nodes 返回No resources found
我的是单master的,也是这种状况,求解决方案

@LiuMicheal
Copy link

我按照v1.28.3走的,走到kubectl get nodes也返回No resources found,通过三个步骤解决:
1)之前忘记关闭master和node的swap了,关闭之后,kubelet.service才正常。
2)master上也要装kubelet。装后,kubectl get node可以看到master。
3)node上不能装Nginx!把node上的Nginx.service关闭之后,问题解决,kubectl get node可以看到master和node。

@LiuMicheal
Copy link

上面的3)回答错了,node上也要安装Nginx。如果node上不装Nginx,master上用kubectl get node将会得到NotReady。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants