Created
October 4, 2023 05:47
-
-
Save chwaee/efdb3c4c499d26822b2d7c3ed7610c62 to your computer and use it in GitHub Desktop.
K8s Nginx ingress controller updates for middleware logging service
This file contains 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: my-app-ingress | |
annotations: | |
# Add annotations specific to your ingress controller, if any | |
nginx.ingress.kubernetes.io/rewrite-target: / | |
spec: | |
rules: | |
- host: myapp.example.com # Your domain | |
http: | |
paths: | |
- path: /log-this-1 | |
pathType: Prefix | |
backend: | |
service: | |
name: logging-middleware-service | |
port: | |
number: 3000 # The port where the middleware listens on | |
- path: /log-this-2 | |
pathType: Prefix | |
backend: | |
service: | |
name: logging-middleware-service | |
port: | |
number: 3000 | |
- path: /normal-path-1 | |
pathType: Prefix | |
backend: | |
service: | |
name: main-app-service | |
port: | |
number: 8080 # The port where the main application listens on | |
- path: /normal-path-2 | |
pathType: Prefix | |
backend: | |
service: | |
name: main-app-service | |
port: | |
number: 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment