Istio Gateway MUTUAL TLS 模式不工作
Istio Gateway MUTUAL TLS mode Not Working
我创建了一个 GKE 集群 1.18.17-gke.1901
并在其上安装了 Istio 1.9.5
。我的入口网关服务属于 type: LoadBalancer
.
我正在尝试在我的 istio-ingressgateway
中实施 MUTUAL TLS
模式。网关配置如下所示:
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: mutual-domain
namespace: test
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- mutual.domain.com
port:
name: mutual-domain-https
number: 443
protocol: HTTPS
tls:
credentialName: mutual-secret
minProtocolVersion: TLSV1_2
mode: MUTUAL
我也设置了相应的 VirtualService 和 DestinationRule。
现在,每当我尝试连接到 https://mutual.domain.com
时,我都会收到以下错误:
* Trying 100.50.76.97...
* TCP_NODELAY set
* Connected to mutual.domain.com (100.50.76.97) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mutual.domain.com:443
* Closing connection 0
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mutual.domain.com:443
如果我将 tls: mode:
更改为 SIMPLE
,我可以通过域名访问该服务,但是当它是 MUTUAL
时,会出现上述错误。
mutual-secret
是一个 tls 类型的 Kubernets 秘密,它包含 tls.crt
和 tls.key
.
$ kubectl describe mutual-secret
Name: mutual-secret
Namespace: istio-system
Labels: <none>
Annotations: <none>
Type: kubernetes.io/tls
Data
====
tls.crt: 4585 bytes
tls.key: 1674 bytes
是不是少了什么?为什么我不能在 MUTUAL
模式下访问我的服务,但同样的秘密适用于 SIMPLE
模式?
我创建了一个 GKE 集群 1.18.17-gke.1901
并在其上安装了 Istio 1.9.5
。我的入口网关服务属于 type: LoadBalancer
.
我正在尝试在我的 istio-ingressgateway
中实施 MUTUAL TLS
模式。网关配置如下所示:
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: mutual-domain
namespace: test
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- mutual.domain.com
port:
name: mutual-domain-https
number: 443
protocol: HTTPS
tls:
credentialName: mutual-secret
minProtocolVersion: TLSV1_2
mode: MUTUAL
我也设置了相应的 VirtualService 和 DestinationRule。
现在,每当我尝试连接到 https://mutual.domain.com
时,我都会收到以下错误:
* Trying 100.50.76.97...
* TCP_NODELAY set
* Connected to mutual.domain.com (100.50.76.97) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mutual.domain.com:443
* Closing connection 0
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mutual.domain.com:443
如果我将 tls: mode:
更改为 SIMPLE
,我可以通过域名访问该服务,但是当它是 MUTUAL
时,会出现上述错误。
mutual-secret
是一个 tls 类型的 Kubernets 秘密,它包含 tls.crt
和 tls.key
.
$ kubectl describe mutual-secret
Name: mutual-secret
Namespace: istio-system
Labels: <none>
Annotations: <none>
Type: kubernetes.io/tls
Data
====
tls.crt: 4585 bytes
tls.key: 1674 bytes
是不是少了什么?为什么我不能在 MUTUAL
模式下访问我的服务,但同样的秘密适用于 SIMPLE
模式?