更新 Istio-IngressGateway TLS 证书
Updating Istio-IngressGateway TLS Cert
我有一个场景,我需要每 24 小时更新一次 Ingress 网关 tls 证书 (/etc/istio/ingressgateway-certs/tls.crt)
和密钥。我能够使用 C# Kubernetes 客户端获取原始字节并创建密钥,但是除非 Ingress Gateway 重新启动,否则它不会获取更新的证书。 有没有办法做到这一点通过代码而不重新启动入口网关部署?
我们也非常感谢任何其他建议。
您正在通过文件引用安装 cert/key。 Istio 现在支持 SDS
,因此您可以通过 credentialName
挂载证书。此模式将在不重新启动的情况下检测新证书。来自文档:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: mygateway
spec:
selector:
istio: ingressgateway # use istio default ingress gateway
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: httpbin-credential # must be the same as secret
hosts:
- httpbin.example.com
顺便说一句:文档说明...
The secret name should not begin with istio or prometheus, and the secret should not contain a token field.
我有一个场景,我需要每 24 小时更新一次 Ingress 网关 tls 证书 (/etc/istio/ingressgateway-certs/tls.crt)
和密钥。我能够使用 C# Kubernetes 客户端获取原始字节并创建密钥,但是除非 Ingress Gateway 重新启动,否则它不会获取更新的证书。 有没有办法做到这一点通过代码而不重新启动入口网关部署?
我们也非常感谢任何其他建议。
您正在通过文件引用安装 cert/key。 Istio 现在支持 SDS
,因此您可以通过 credentialName
挂载证书。此模式将在不重新启动的情况下检测新证书。来自文档:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: mygateway
spec:
selector:
istio: ingressgateway # use istio default ingress gateway
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: httpbin-credential # must be the same as secret
hosts:
- httpbin.example.com
顺便说一句:文档说明...
The secret name should not begin with istio or prometheus, and the secret should not contain a token field.