- 在 ingress 规则中添加 TLS 配置 - 为 consul.kl.suyiiyii.top 域名配置 HTTPS - 使用 cert-manager 生成并管理 TLS 证书
23 lines
482 B
YAML
23 lines
482 B
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: consul-ingress
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- consul.kl.suyiiyii.top
|
|
secretName: consul-tls
|
|
rules:
|
|
- host: consul.kl.suyiiyii.top
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: consul
|
|
port:
|
|
number: 8500
|