通过https访问kubernetes仪表板

通过https访问kubernetes仪表板,kubernetes,Kubernetes,我已使用CA身份验证启动了kube apiserver,身份验证使用--secure port=8181,不安全的地址和端口是默认地址和端口(localhost:8080): 浏览器中的kubernetes仪表板页面返回以下错误: Get http://localhost:8080/api/v1/replicationcontrollers: dial tcp [::1]:8080: getsockopt: connection refused 但是url“httpS://域:8181/api

我已使用CA身份验证启动了
kube apiserver
,身份验证使用
--secure port=8181
,不安全的地址和端口是默认地址和端口(
localhost:8080
):

浏览器中的
kubernetes仪表板
页面返回以下错误:

Get http://localhost:8080/api/v1/replicationcontrollers: dial tcp [::1]:8080: getsockopt: connection refused
但是url“httpS://域:8181/api/v1/replicationcontrollers”也将返回RCs


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

您可以通过https公开任何kubernetes服务,方法是在其前面部署入口控制器,如nginx:。这个nginx控制器将终止tls,因此即使您的后端不支持https,它也应该可以工作。有几种方法可以通过它强制使用https:

您可以通过https公开任何Kubernetes服务,方法是在其前面部署入口控制器,如nginx:。这个nginx控制器将终止tls,因此即使您的后端不支持https,它也应该可以工作。有几种方法可以通过它强制执行https:

您的意思是我可以管理入口控制器后面的
apiserver
?如何在ingress rc文件中指定apiserver的后端
serviceName
?您的意思是我可以管理ingress控制器后面的
apiserver
?如何在入口rc文件中指定apiserver的后端
serviceName
Get http://localhost:8080/api/v1/replicationcontrollers: dial tcp [::1]:8080: getsockopt: connection refused