首页 > 系统相关 >配置ingress nginx ssl及禁用ssl强制跳转

配置ingress nginx ssl及禁用ssl强制跳转

时间:2022-11-25 21:01:14浏览次数:46  
标签:tls ingress nginx ssl secret io 跳转

创建证书secret

kubectl create secret tls lavatest-tls-secret   --cert=/root/6694248.com.key   --key=/root/6694248com.pem -n test

创建ingress

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-web
namespace: test
annotations:
# 指定Ingress Controller的类型
kubernetes.io/ingress.class: "nginx"
spec:
tls:
- hosts:
- www.baidu.com
secretName: tls-secret-mobile
rules:
- host: www.baidu.com
http:

禁用ssl强制跳转

  annotations:
nginx.ingress.kubernetes.io/use-regex: "true"

标签:tls,ingress,nginx,ssl,secret,io,跳转
From: https://blog.51cto.com/yht1990/5887758

相关文章