我使用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
但是url "httpS://domain:8181/api/v1/replicationcontrollers“也会返回RCs。
那么,是否有办法只使用安全端口呢?我的意思是通过https访问kubernetes仪表板。
发布于 2016-08-03 21:15:51
您可以通过https公开任何Kubernetes服务,方法是在其前面部署一个侵入控制器,如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
https://stackoverflow.com/questions/37296139
复制相似问题