【发布时间】:2020-10-07 09:43:33
【问题描述】:
我有几个微服务,我们的后端是 opendj/ldap。它已配置为使用 SSL。现在我们正在尝试使用 ISTIO 作为我们的 k8s 服务网格。其他所有服务都可以正常工作,但 ldap 服务器 - opendj - 不是。我的猜测是因为 ssl 配置。这意味着使用自签名证书。
我有一个在 istio 命名空间中创建自签名证书的脚本,我尝试在 gateway.yaml 上像这样使用它
- port:
number: 4444
name: tcp-admin
protocol: TCP
hosts:
- "*"
tls:
mode: SIMPLE # enable https on this port
credentialName: tls-certificate # fetch cert from k8s secret
我也试过用
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: opendj-istio-mtls
spec:
host: opendj.{{.Release.Namespace }}.svc.cluster.local
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
credentialName: tls-certificate
---
apiVersion: authentication.istio.io/v1alpha1
kind: Policy
metadata:
name: opendj-receive-tls
spec:
targets:
- name: opendj
peers:
- mtls: {}
对于 ldap 服务器,但它没有连接。尝试在 gateway.yaml 中使用 tls 规范时出现此错误
Error: admission webhook "pilot.validation.istio.io" denied the request: configuration is invalid: server cannot have TLS settings for non HTTPS/TLS ports
还有来自 opendj 服务器的日志
INFO - entrypoint - 2020-06-17 12:49:44,768 - Configuring OpenDJ.
WARNING - entrypoint - 2020-06-17 12:49:48,987 -
Unable to connect to the server at
"oj-opendj-0.opendj.default.svc.cluster.local" on port 4444
WARNING - entrypoint - 2020-06-17 12:49:53,293 -
Unable to connect to the server at
"oj-opendj-0.opendj.default.svc.cluster.local" on port 4444
有人可以帮我解决这个问题。
【问题讨论】:
标签: ssl kubernetes ldap istio opendj