kubernetes - 从外部访问 Kubernetes Play 仪表板
问题描述
我想通过 Play with Kubernetes 网站学习 Kubernetes,但我似乎遇到了一些问题。这就是我所做的。我按照这些步骤创建了我的 Kubernetes 集群。
https://labs.play-with-k8s.com/p/bc3a57pk4ckg00bvdk70#bc3a57pk_bc3amn9k4ckg00bvdkv0
我有以下信息,有 1 个主节点和 2 个节点
[node1 ~]$ kubectl cluster-info
Kubernetes master is running at https://192.168.0.18:6443
Heapster is running at https://192.168.0.18:6443/api/v1/namespaces/kube-system/services/heapster/proxy
KubeDNS is running at https://192.168.0.18:6443/api/v1/namespaces/kube-system/services/kube-dns/proxy
monitoring-influxdb is running at https://192.168.0.18:6443/api/v1/namespaces/kube-system/services/monitoring-influxdb/proxy
然后,我使用以下步骤部署我的仪表板。
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
[node1 ~]$ kubectl -n kube-system get service kubernetes-dashboard
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes-dashboard ClusterIP 10.98.185.58 <none> 443/TCP 58m
根据这个问题https://github.com/play-with-docker/play-with-docker/issues/258 在 UI 中不再可以访问仪表板端口
现在,我如何从外部访问我的仪表板?根据这里的常见问题解答.. https://github.com/play-with-docker/play-with-docker
How can I connect to a published port from the outside world?
If you need to access your services from outside, use the following URL pattern http://ip<hyphen-ip>-<session_jd>-<port>.direct.labs.play-with-docker.com (i.e: http://ip-2-135-3-b8ir6vbg5vr00095iil0-8080.direct.labs.play-with-docker.com).
给定我的 IP 地址
https://labs.play-with-k8s.com/p/bc3a57pk4ckg00bvdk70#bc3a57pk_bc3amn9k4ckg00bvdkv0
I tried it with this but I am not successful in accessing the dashboard
http://ip-192-168-0-18-bc3a57pk4ckg00bvdk70-8443.direct.labs.play-with-docker.com/
我做错了什么或我错过了什么?
在 play-with-kubernetes中尝试了此Running 仪表板中的所有内容 没有什么是成功的
有什么提示吗?
解决方案
你见过这个吗?https://github.com/play-with-docker/play-with-docker/issues/259#issuecomment-387607163
您需要在部署中进行一些更改才能从外部访问。
推荐阅读
- cmake - 创建 CMake XXConfig.cmake 让其他 cmake 项目调用
- laravel - 如何从 Laravel IOC 容器中解析上下文绑定的类
- core-data - 使用列表中的 CoreData 对象作为环境对象
- javascript - Vuejs三元运算符/条件不工作在v-bind-style
- c# - C# 找不到统一自动生成的类
- delphi - 如何使用标志 XPS_PASS 在 delphi 中将数据直接发送到 XPS 打印机
- excel - 在循环中运行鼠标左键单击,直到达到特定时间
- excel - Excel:使用一个表中的值在第二个表中查找值
- c++ - 包模板包
- azure - 是否可以通过 Java Azure SDK 使用服务主体对 CosmosDB 进行身份验证?