gpt4 book ai didi

kubernetes - 无法在CentOS上部署kubernetes仪表板

转载 作者:行者123 更新时间:2023-12-02 12:22:26 26 4
gpt4 key购买 nike

我使用Virtual Box在Windows机器上设置了kubernetes集群。我有4个Guest CentOS 7系统正在运行。我已经使用https://kubernetes.io/docs/getting-started-guides/centos/centos_manual_config/指南设置了集群。部署kubernetes仪表板时出现错误

Error from server (AlreadyExists): error when creating "kubernetes-dashboard.yaml": serviceaccounts "kubernetes-dashboard" already exists
Error from server (BadRequest): error when creating "kubernetes-dashboard.yaml": ClusterRoleBinding in version "v1beta1" cannot be handled as a ClusterRoleBinding: no kind "ClusterRoleBinding" is registered for version "rbac.authorization.k8s.io/v1beta1"
error validating "kubernetes-dashboard.yaml": error validating data: found invalid field tolerations for v1.PodSpec; if you choose to ignore these errors, turn validation off with --validate=false

然后,我再次使用-validate = false选项执行了命令。这次我收到以下错误
Error from server (AlreadyExists): error when creating "kubernetes-dashboard.yaml": serviceaccounts "kubernetes-dashboard" already exists
Error from server (BadRequest): error when creating "kubernetes-dashboard.yaml": ClusterRoleBinding in version "v1beta1" cannot be handled as a ClusterRoleBinding: no kind "ClusterRoleBinding" is registered for version "rbac.authorization.k8s.io/v1beta1"
Error from server (AlreadyExists): error when creating "kubernetes-dashboard.yaml": deployments.extensions "kubernetes-dashboard" already exists
Error from server (AlreadyExists): error when creating "kubernetes-dashboard.yaml": services "kubernetes-dashboard" already exists

我已经看到很多人都遇到了类似的错误,但是在任何地方都找不到解决方案。一些命令的输出
$kubectl get pods -a -o wide --all-namespaces
Name: kubernetes-dashboard
Namespace: kube-system
Labels: k8s-app=kubernetes-dashboard
Selector: k8s-app=kubernetes-dashboard
Type: ClusterIP
IP: 10.254.25.191
Port: <unset> 80/TCP
Endpoints: <none>
Session Affinity: None
No events.

$kubectl get pods -a -o wide --all-namespaces
No resources found.

$kubectl cluster-info
Kubernetes master is running at http://localhost:8080

$kubectl get nodes
NAME STATUS AGE
centos-minion-1 Ready 2d
centos-minion-2 Ready 2d
centos-minion-3 Ready 2d

如果我错过了什么,请告诉我

谢谢
阿莫尔

最佳答案

检查您的kubectl版本

我在最新版本中也遇到了同样的问题,然后安装了旧版本的仪表板。

kubectl创建-f https://raw.githubusercontent.com/kubernetes/dashboard/v1.5.1/src/deploy/kubernetes-dashboard.yaml

关于kubernetes - 无法在CentOS上部署kubernetes仪表板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45075240/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com