kubernetes - 为什么与 ISTIO 集成的 Cert Manager(和 Lets encrypt)无法完成 HTTP01 挑战
问题描述
我正在尝试按照此处的文档将 ISTIO 与证书管理器集成: https ://istio.io/latest/docs/ops/integrations/certmanager/
但我收到错误消息:
Waiting for HTTP-01 challenge propagation:
failed to perform self check GET request 'http://<domain>/.well-known/acme-challenge/rhLUqegNfgpWkwIlKDUTunTbD_DTwrH4oRvtHKkNJZs':
Get "http://<domain>/.well-known/acme-challenge/rhLUqegNfgpWkwIlKDUTunTbD_DTwrH4oRvtHKkNJZs":
dial tcp <IP>:80: connect: connection refused
证书管理器版本:V1.1.0
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.1.0/cert-manager.yaml
我还在 DNS 服务器上为我的域在 GKE 上创建了一条带有 ISTIO 入口 IP 地址的 A 记录。
这是我使用的配置:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-staging
namespace: istio-system
spec:
acme:
# Let's Encrypt uses this to contact you about expiring
# certificates, and issues related to your account.
email: <email>
server: https://acme-staging-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: letsencrypt-staging
solvers:
- http01:
ingress:
class: nginx
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: ingressgateway-certs
namespace: istio-system
spec:
secretName: ingressgateway-certs
commonName: <domain>
issuerRef:
name: letsencrypt-staging
kind: ClusterIssuer
dnsNames:
- <domain>
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: ingress-gateway
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: ingressgateway-certs
hosts:
- <domain>
谢谢
解决方案
解决了。中的ingress class
字段ClusterIssuer
需要更改为istio
。
推荐阅读
- ecmascript-6 - 意外的令牌 { 使用 Webpack 4 和 @babel/preset-env
- rest - 针对非 REST 操作的 REST API 设计
- c# - 在身份验证 ASP.CORE 期间重定向到多个页面
- visual-studio - 如何在 Visual Studio 生成的发布配置文件中设置环境
- python - 张量流中的非全连接层
- sql - INTERSECT 与 LEFT OUTER JOIN 性能
- javascript - 在 JavaScript 中反转字符串
- python - 沿轴 = 1 对值进行排序,在行的开头使用 NaN
- c# - 每条命令发送到串口延迟 500ms
- java - 使用 iText 如何更改新行之间的距离?