Kubernetes仪表板的Istio网关和VirtualService问题

时间:2019-05-31 16:03:01

标签: kubernetes istio

我正在使用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-TLS模式从mode: SIMPLE更改为模式mode: PASSTHROUGH,但是PASSTHROUGH我只是在浏览器中获得了We can’t connect to the server

1 个答案:

答案 0 :(得分:0)

如果您正确配置PASSTHROUGH,我认为它应该可以工作。这是一个执行类似操作的示例。 https://istio.io/docs/examples/advanced-gateways/ingress-sni-passthrough/

相关问题