【发布时间】:2019-05-31 16:03:00
【问题描述】:
我正在使用 Istio 1.1.7 并尝试了以下网关和 VirtualService 到 Kubernetes 仪表板。
但我看到以下内容:
kubectl -n kube-system logs -f kubernetes-dashboard-7cf9657c74-5fsmq
2019/05/31 15:53:04 http: TLS handshake error from 10.244.3.11:54392: tls: first record does not look like a TLS handshake
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: default-ingressgateway
namespace: default
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- "*"
port:
name: http
number: 80
protocol: HTTP
- hosts:
- "*"
port:
name: https
number: 443
protocol: HTTPS
tls:
mode: SIMPLE
privateKey: /etc/istio/ingressgateway-certs/tls.key
serverCertificate: /etc/istio/ingressgateway-certs/tls.crt
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: dashboard-virtualservice
namespace: kube-system
spec:
hosts:
- "*"
gateways:
- default/default-ingressgateway
http:
- match:
- uri:
prefix: "/dashboard"
rewrite:
uri: "/"
route:
- destination:
host: kubernetes-dashboard
port:
number: 443
注意:我还尝试将 Gateway Server-TLSOptions-TLSmode 从 mode: SIMPLE 更改为模式 mode: PASSTHROUGH,但 PASSTHROUGH 我只是在浏览器中得到 We can’t connect to the server。
【问题讨论】:
标签: kubernetes istio