我正在尝试“启用自动的TLS证书配置”
我有一个工作的ClusterIssuer(status:"True"),我能够手动创建一个证书(status:"True")。
我正在尝试启用自动TLS供应模式。
环境设置:
Knative: v0.12
Istio: v1.4 (SDS)
cert-manager: v0.13.1
kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.9", GitCommit:"2e808b7cb054ee242b68e62455323aa783991f03", GitTreeState:"clean", BuildDate:"2020-01-18T23:33:14Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.9-gke.9", GitCommit:"a9973cbb2722793e2ea08d20880633ca61d3e669", GitTreeState:"clean", BuildDate:"2020-02-07T22:35:02Z", GoVersion:"go1.12.12b4", Compiler:"gc", Platform:"linux/amd64"}我有以下网关:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: knative-ingress-gateway
namespace: knative-serving
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
tls:
# Sends 301 redirect for all http requests.
# Omit to allow http and https.
httpsRedirect: false
- port:
number: 443
name: https
protocol: HTTPS
hosts:
- "mydomain.com"
tls:
mode: SIMPLE
privateKey: /etc/istio/ingressgateway-certs/tls.key
serverCertificate: /etc/istio/ingressgateway-certs/tls.crt在申请时:
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-go
namespace: default
spec:
template:
spec:
containers:
- image: gcr.io/knative-samples/helloworld-go # The URL to the image of the app
env:
- name: TARGET
value: "Go Sample v1"我可以(注意: httpsRedirect: false):
curl http://helloworld-go.default.mydomain.com
Hello Go Sample v1!但是,当尝试使用https时:
curl https://helloworld-go.default.mydomain.com
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to helloworld-go.default.mydomain.com:443还:
本机文档声明:“在这种模式下,将为每个命名空间提供单个证书,并在will中重用”,但我没有在任何命名空间中看到任何证书。
请注意,kubectl get ksvc url是http而不是https:
kubectl get ksvc
NAME URL LATESTCREATED LATESTREADY READY REASON
helloworld-go http://helloworld-go.default.mydomain.com helloworld-go-lxr2n helloworld-go-lxr2n True 发布于 2020-10-16 16:54:11
我也有过同样的问题。但是版本为0.16.0。我通过没有使用cert管理器的“启用自动TLS证书配置”来修正它,而是使用了直接从knative提供的HTTP-01。
如何使用加密HTTP01挑战自动提供TLS证书:
https://stackoverflow.com/questions/60429443
复制相似问题