我在microk8s中启用了仪表板:
microk8s.enable dns dashboard
Run Code Online (Sandbox Code Playgroud)
我找到了它的IP地址:
microk8s.kubectl get all --all-namespaces
...
kube-system service/kubernetes-dashboard ClusterIP 10.152.183.212 <none> 443/TCP 24h
...
Run Code Online (Sandbox Code Playgroud)
我试图使用URL https://10.152.183.212在浏览器中显示它。我的浏览器显示错误“身份验证失败。请重试。”:
我还收到了类似的错误,“没有足够的数据来创建身份验证信息结构。”
我正在使用Google云平台和Kubernetes.
我正在尝试找出我应该使用哪个令牌才能登录仪表板并拥有足够的权限来做我喜欢的事情.
我在Google Cloud Platform上创建了一个3节点Kubernetes 1.8.6群集
我的开发人员桌面是Mac Pro(2013年末)在macos high sierra 10.13.2上,google-cloud-sdk和kubernetes-cli是从自制软件安装的.
~ ??? kubectl version ? 1
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T20:00:41Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8+", GitVersion:"v1.8.6-gke.0", GitCommit:"ee9a97661f14ee0b1ca31d6edd30480c89347c79", GitTreeState:"clean", BuildDate:"2018-01-05T03:36:42Z", GoVersion:"go1.8.3b4", Compiler:"gc", Platform:"linux/amd64"}
Run Code Online (Sandbox Code Playgroud)
和
~ ??? gcloud version
Google Cloud SDK 184.0.0
bq 2.0.28
core 2018.01.05
gsutil 4.28
Run Code Online (Sandbox Code Playgroud)
我在文档中读到,为仪表板创建管理员用户并不安全,遗憾的是仪表板窗格的所有权限让我感到困惑.
当我执行kubectl get secrets -n kube-system并解码其中一个令牌时kubectl get secret <TOKEN_NAME> -n=kube-system -o json | jq -r '.data["token"]' | base64 -D > user_token.txt
并使用它来使用我从命令启动的kubectl Web代理登录 …
我无法从 Minikube 中删除 kubernetes-dashboard。我尝试多次删除部署“deployment.apps/kubernetes-dashboard”。但它会在几秒钟内自动重新创建。
我正在使用以下命令删除部署:
kubectl 删除 deployment.apps/kubernetes-dashboard -n kube-system
我什至尝试通过将副本计数设置为零来编辑部署。但即使它会在几秒钟后自动重置。
同样的事情发生在 kube-system 中的 nginx-ingress 部署中。
Kubernetes 仪表板输出一堆错误消息。
你应该忽略他们吗?如果没有,你如何解决它们?
warning
configmaps is forbidden: User "system:serviceaccount:kube-system:deployment-controller" cannot list resource "configmaps" in API group "" in the namespace "default"
warning
persistentvolumeclaims is forbidden: User "system:serviceaccount:kube-system:deployment-controller" cannot list resource "persistentvolumeclaims" in API group "" in the namespace "default"
warning
secrets is forbidden: User "system:serviceaccount:kube-system:deployment-controller" cannot list resource "secrets" in API group "" in the namespace "default"
warning
services is forbidden: User "system:serviceaccount:kube-system:deployment-controller" cannot list resource "services" in API group "" in the namespace "default"
warning
ingresses.extensions is forbidden: User …Run Code Online (Sandbox Code Playgroud) 我使用此命令在远程主机上安装并启用 Kubernetes 仪表板:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml
kubectl proxy --address='192.168.1.132' --port=8001 --accept-hosts='^*$'
http://192.168.1.132:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login
Run Code Online (Sandbox Code Playgroud)
但我得到:
Insecure access detected. Sign in will not be available. Access Dashboard securely over HTTPS or using localhost. Read more here .
Run Code Online (Sandbox Code Playgroud)
是否可以在 Kubernetes 主机上启用 SSL 连接,以便我可以在没有此警告消息的情况下访问它并启用登录?
我已经在集群上部署了 Kubernetes Dashboard,并且能够使用 kubectl 代理访问仪表板。
但是当我尝试使用 URL 通过浮动 IP/VIP 访问仪表板时:
https://<FloatingIP>:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login
Run Code Online (Sandbox Code Playgroud)
我最终在浏览器上得到以下响应
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "services \"https:kubernetes-dashboard:\" is forbidden: User \"system:anonymous\" cannot get resource \"services/proxy\" in API group \"\" in the namespace \"kube-system\"",
"reason": "Forbidden",
"details": {
"name": "https:kubernetes-dashboard:",
"kind": "services"
},
"code": 403
}
Run Code Online (Sandbox Code Playgroud)
我确实知道这个问题是由于 Kubernetes 上的 RBAC 造成的,并围绕这个主题做了一些阅读,但我仍然不清楚需要做什么来解决主集群实现上的这个问题。我能够在单个主服务器上成功公开仪表板 - 具有 NodePort 访问权限的多节点设置,但是使用集群主设置会失败。
我也愿意接受在此拓扑中实施仪表板的更好建议。
如果您需要任何其他信息,请告诉我
我已经使用 let encrypt 证书配置了 istio 入口。我可以使用网关和虚拟服务访问在不同端口上运行的 https 上的不同服务。
但是 kubernetes-dashboard 在 kube-system 命名空间中的 443 端口上运行,并使用自己的证书,我如何通过 istio 网关和虚拟服务公开它。
我已经为仪表板定义了子域并创建了网关、虚拟服务,它将 443 流量定向到 kuberentes 仪表板服务,但它不起作用。
我按照指南在我的 ubuntu-18.04 虚拟机上安装了一个测试 minikube。它是我的 Windows 计算机上的 virtualbox。所以我使用 sudo minikube start --vm-driver=none 来启动 minikube。然后执行 minikube dashboard ....我可以使用生成的令牌访问http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ 。现在一切都很好。
但我需要在周末关闭计算机电源。所以我停止 minikube 并关闭 ubuntu 虚拟机。
sudo minikube stop
sudo shutdown
Run Code Online (Sandbox Code Playgroud)
当我周一回到工作岗位时,我无法访问仪表板 UI WEB,
sudo minikube dashboard一直挂起,直到我按 Ctrl+C。
minikube 仪表板挂起,直到我按 Ctrl+C
如何恢复wei ui?或者在关闭虚拟机之前我需要做什么?
我在版本中使用 kubernetes dasboard:v1.10.1
当我转到“角色”选项卡时,我可以看到 ClusterRoles 和角色的列表。
我想从列表中查看有关特定角色的更多详细信息,但没有看到任何“详细信息”按钮。我想在仪表板小部件中甚至以 yaml 格式查看有关角色的信息。我是否遗漏了什么或无法通过仪表板实现?
我是 k8s 的新手,我正在尝试在主节点上部署仪表板,部署的一部分是启动指标服务器。可以在此处找到完整的文档(仪表板/指标服务器)。
我的问题与我们可以在部署后立即看到的警告有关:
$ kubectl describe pods -n kube-system metrics-server-74d7f54fdc-psz5p
Name: metrics-server-74d7f54fdc-psz5p
Namespace: kube-system
Priority: 0
Node: <none>
Labels: k8s-app=metrics-server
pod-template-hash=74d7f54fdc
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/metrics-server-74d7f54fdc
Containers:
metrics-server:
Image: my.repo.net/k8s.gcr.io/metrics-server-amd64:v0.3.6
Port: 4443/TCP
Host Port: 0/TCP
Args:
--cert-dir=/tmp
--secure-port=4443
Environment: <none>
Mounts:
/tmp from tmp-dir (rw)
/var/run/secrets/kubernetes.io/serviceaccount from metrics-server-token-d47dm (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
tmp-dir:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
metrics-server-token-d47dm: …Run Code Online (Sandbox Code Playgroud)