gpt4 book ai didi

Kubernetes 仪表板 - ServiceUnavailable(503 错误)

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

我是 Kubernetes 新手。我正在尝试使用 kops 在 AWS 上设置 Kubernetes 集群。我成功地设置了集群。但是,我无法访问仪表板 UI。 ( https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui )

当我访问主节点时,我看到以下错误:

{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "no endpoints available for service \"kubernetes-dashboard\"",
"reason": "ServiceUnavailable",
"code": 503
}

我看到仪表板的状态为 CrashLoopBackOff。 (请注意:我已经删除了以下日志中其他 pod 的名称)
~$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system kubernetes-dashboard-4167803980-vnx3k 0/1 CrashLoopBackOff 6 6m

$ kubectl logs kubernetes-dashboard-4167803980-vnx3k --namespace=kube-system
2017/09/25 17:50:37 Using in-cluster config to connect to apiserver
2017/09/25 17:50:37 Using service account token for csrf signing
2017/09/25 17:50:37 No request provided. Skipping authorization
2017/09/25 17:50:37 Starting overwatch
2017/09/25 17:50:37 Successful initial request to the apiserver, version: v1.7.2
2017/09/25 17:50:37 New synchronizer has been registered: kubernetes-dashboard-key-holder-kube-system. Starting
2017/09/25 17:50:37 Starting secret synchronizer for kubernetes-dashboard-key-holder in namespace kube-system
2017/09/25 17:50:37 Initializing secret synchronizer synchronously using secret kubernetes-dashboard-key-holder from namespace kube-system
2017/09/25 17:50:37 Initializing JWE encryption key from synchronized object
2017/09/25 17:50:37 Creating in-cluster Heapster client
2017/09/25 17:50:37 Serving securely on HTTPS port: 8443
2017/09/25 17:50:37 open /certs/dashboard.crt: no such file or directory

我真诚地感谢任何帮助/建议让仪表板运行。提前致谢!

最佳答案

您使用最新的仪表板,看起来需要 SSL 证书。尝试使用 1.6.3 它将在没有 SSL 证书的情况下工作。

我在我的集​​群中运行这个版本。

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.6.3/src/deploy/kubernetes-dashboard.yaml

用于安装仪表板的 Helm 命令
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin  --serviceaccount=kube-system:default
helm install stable/kubernetes-dashboard --name kubernetes-dashboard --namespace kube-system --debug
helm install stable/heapster --namespace kube-system

关于Kubernetes 仪表板 - ServiceUnavailable(503 错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46411598/

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