Created
June 3, 2022 15:38
-
-
Save Neutrollized/e37f9baf8f9510d003505a66abe2c7fe to your computer and use it in GitHub Desktop.
Medium: NGINX Ingress or GKE Ingress
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/v1 | |
| kind: Ingress | |
| metadata: | |
| name: nginx-ingress-rewrite | |
| annotations: | |
| kubernetes.io/ingress.class: "nginx" | |
| nginx.ingress.kubernetes.io/ssl-redirect: "false" | |
| nginx.ingress.kubernetes.io/rewrite-target: /$2 | |
| spec: | |
| defaultBackend: | |
| service: | |
| name: web | |
| port: | |
| number: 80 | |
| rules: | |
| - host: "mysite.example.com" | |
| http: | |
| paths: | |
| - pathType: Prefix | |
| path: "/hello(/|$)(.*)" | |
| backend: | |
| service: | |
| name: payments | |
| port: | |
| number: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment