Skip to content

Instantly share code, notes, and snippets.

@rahuls360
Created May 31, 2023 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahuls360/bef54999ca36990344b73bcffc1499cf to your computer and use it in GitHub Desktop.
Save rahuls360/bef54999ca36990344b73bcffc1499cf to your computer and use it in GitHub Desktop.
Nginx ingress between 2 different paths/routes
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /service1
pathType: Prefix
backend:
service:
name: nginx-service1
port:
number: 80
- path: /service2
pathType: Prefix
backend:
service:
name: nginx-service2
port:
number: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment