[英]Unable to install Kubernetes dashboard on AWS
Kubernetes 1.14+ Kubernetes 1.14+
1) Open terminal on your workstation: (standard ssh tunnel to port 8002) 1)在工作站上打开终端:(到端口8002的标准ssh隧道)
$ ssh -i "aws.pem" -L 8002:localhost:8002 ec2-user@ec2-50-50-50-50.eu-west-1.compute.amazonaws.com $ ssh -i“ aws.pem” -L 8002:localhost:8002 ec2-user@ec2-50-50-50-50.eu-west-1.compute.amazonaws.com
2) When you are connected type: $ kubectl proxy -p 8002 2)连接时:$ kubectl proxy -p 8002
3) Open the following link with a web browser to access the dashboard endpoint: http://localhost:8002/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/ 3)使用Web浏览器打开以下链接以访问仪表板端点: http:// localhost:8002 / api / v1 / namespaces / kube-system / services / https:kubernetes-dashboard:/ proxy /
Try this: 尝试这个:
$ kubectl proxy
Open the following link with a web browser to access the dashboard endpoint: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/ 使用Web浏览器打开以下链接以访问仪表板端点: http:// localhost:8001 / api / v1 / namespaces / kube-system / services / https:kubernetes-dashboard:/ proxy /
I had similar issue with reaching the dashboard following your linked tutorial. 在您链接的教程之后到达仪表板时,我遇到了类似的问题。 One way of approaching your issue is to change the type of the service to LoadBalancer:
解决问题的一种方法是将服务类型更改为LoadBalancer:
Exposes the service externally using a cloud provider's load balancer.
使用云提供商的负载平衡器从外部公开服务。 NodePort and ClusterIP services, to which the external load balancer will route, are automatically created.
将自动创建外部负载均衡器将路由到的NodePort和ClusterIP服务。
For that use: kubectl get services --all-namespaces
为此用途:
kubectl get services --all-namespaces
kubectl edit service kubernetes-dashboard -n kube-system -o yaml
and change the type to LoadBalancer. kubectl edit service kubernetes-dashboard -n kube-system -o yaml
并将类型更改为LoadBalancer。 Wait till the the ELB gets spawned(takes couple of minutes) and then run kubectl get services --all-namespaces
again and you will see the address of your dashboard service and you will be able to reach it under the “External Address”. 等待ELB产生(需要几分钟),然后再次运行
kubectl get services --all-namespaces
,您将看到仪表板服务的地址,并且可以在“外部地址”下访问它。
As for the tutorial you have posted it is from 2016, and it turns out something went wrong with the /ui in the address url, you can read more about it in this github issue . 至于您发布的教程是2016年发布的,结果发现/ ui地址中的/ ui出了问题,您可以在github问题中阅读有关它的更多信息。 There is a claim that you should use /ui after authentication, but it also does not work.
有人声称您应在身份验证后使用/ ui,但它也不起作用。
For the default settings of ClusterIP you will be able to reach the dashboard on this address: 'YOURHOSTNAME'/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login 对于ClusterIP的默认设置,您将能够访问该地址上的仪表板:'YOURHOSTNAME'/ api / v1 / namespaces / kube-system / services / https:kubernetes-dashboard:/ proxy /#!/ login
Another option is to delete the old dashboard: 另一个选择是删除旧的仪表板:
Kubectl delete -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
Install the official one : 安装官方一个 :
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
Run kubectl proxy
and reach it on localhost using: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/overview
运行
kubectl proxy
并使用以下命令在localhost上访问它: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/overview
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.