Created
July 28, 2020 13:54
-
-
Save carlessanagustin/2138bbeb6414245f54e9344bd0e51572 to your computer and use it in GitHub Desktop.
Kubernetes Ingress path redirection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ingress-path | |
annotations: | |
kubernetes.io/ingress.class: internal | |
nginx.ingress.kubernetes.io/rewrite-target: /$2 | |
nginx.ingress.kubernetes.io/use-regex: "true" | |
spec: | |
rules: | |
- http: | |
paths: | |
- backend: | |
serviceName: target-service | |
servicePort: 80 | |
path: /my-path(/|$)(.*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment