首页 > 其他分享 >kubectl 报错 Error from server (InternalError): an error on the server ("") has prevented th

kubectl 报错 Error from server (InternalError): an error on the server ("") has prevented th

时间:2023-02-11 15:47:11浏览次数:38  
标签:kubectl server version 报错 v1.25 kube

在k8s的work节点 kubectl get  nodes  报错,

kubectl  version也是同样的报错

Error from server (InternalError): an error on the server ("") has prevented the request from succeeding

然后怎么办呢,各种搜索,需要将master节点的/root/.kube/config 文件拷贝到work节点的 /root/.kube目录即可。

[root@node01 .kube]# kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17:44:59Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17:38:15Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/amd64"}
[root@node01 .kube]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master01 Ready control-plane 28h v1.25.0
node01 Ready <none> 28h v1.25.0
node02 Ready <none> 28h v1.25.0

 

标签:kubectl,server,version,报错,v1.25,kube
From: https://www.cnblogs.com/vzhangxk/p/17111784.html

相关文章