我想使用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/
我做错了什么或我错过了什么?
尝试了Running dashboard inside play-with-kubernetes中的所有内容 没有什么是成功的
任何提示?
答案 0 :(得分:-1)
您需要在部署中进行一些更改才能从外部进行访问。