【问题标题】:Access the kubernetes dashboard via https通过 https 访问 Kubernetes 仪表板
【发布时间】:2016-09-14 17:38:37
【问题描述】:

我已经开始kube-apiserver 使用--secure-port=8181 进行CA 身份验证,并且不安全的地址和端口是默认的(localhost:8080):

$ kubectl cluster-info
Kubernetes master is running at localhost:8080
kubernetes-dashboard is running at localhost:8080/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard

浏览器中kubernetes-dashboard的页面返回如下错误:

Get http://localhost:8080/api/v1/replicationcontrollers: dial tcp [::1]:8080: getsockopt: connection refused

但网址“httpS://domain:8181/api/v1/replicationcontrollers”也会返回 RC。

那么有没有办法只使用安全端口?我的意思是通过https访问kubernetes仪表板。

【问题讨论】:

    标签: kubernetes


    【解决方案1】:

    您可以通过 https 公开任何 Kubernetes 服务,方法是在其前面部署一个 Ingress 控制器,例如 nginx:https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx。这个 nginx 控制器将终止 tls,因此即使您的后端不支持 https,它也应该可以工作。有几种方法可以通过它强制 https:https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx#server-side-https-enforcement

    【讨论】:

    • 你的意思是我可以管理入口控制器后面的apiserver 吗? ingress rc文件中如何指定apiserver的后端serviceName
    猜你喜欢
    • 2018-06-12
    • 2020-06-02
    • 1970-01-01
    • 2016-12-08
    • 1970-01-01
    • 1970-01-01
    • 2019-02-18
    • 1970-01-01
    相关资源
    最近更新 更多