rules
.http
.paths
.path
で正規表現でマッチさせたものが
metadata
.annotations
.nginx.ingress.kubernetes.io/rewrite-target
に入ります。
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
namespace: my-namespace
annotations:
ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/rewrite-target: /api/apppath/$1
spec:
tls:
- secretName: my-http-cert
rules:
- host: log.ytyng.com
http:
paths:
- path: /(.*)
pathType: Prefix
backend:
service:
name: my-service-service
port:
number: 8000
コメント