-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method Based Routing in Nginx Ingress #5552
Comments
Hi @abhijitvikash thanks for reporting! Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂 I've parsed the text of your issue and it looks like you might be mixing up the two Ingress Controllers, please take a look at this page to see the differences between Cheers! |
Method based routing. I am asking because the project offers Method filtering / blocking which might also meet the need. |
@brianehlert I think @abhijitvikash is using community project looking at the annotations here. |
This one - https://github.com/kubernetes/ingress-nginx |
helm template my-nginx ingress-nginx/ingress-nginx --values values-ext.yaml --namespace ingress-nginx > nginx-ingress-external-manifest.yaml |
@abhijitvikash Hello there. You can see our documentation located here: https://docs.nginx.com/nginx-ingress-controller/ If you are using the If you are using our CRD definitions, you can use snippets as well: Let us know if that helps. |
Hi Nginx, I want to implement method based routing(GET PUT OPTIONS) in Nginx Ingress. But seems like this is not supported either using :
nginx.ingress.kubernetes.io/configuration-snippet
nginx.ingress.kubernetes.io/server-snippet:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: testing-ingress-01
annotations:
nginx.ingress.kubernetes.io/configuration-snippet: |
set $target_backend "httpd-service.default.svc.cluster.local";
if ($request_method = 'PUT') {
set $target_backend "httpd-service.default.svc.cluster.local"; # Change this to your PUT service if needed
}
if ($request_method = 'GET') {
set $target_backend "httpd-service.default.svc.cluster.local"; # Change this to your GET service if needed
}
proxy_pass http://$target_backend;
spec:
ingressClassName: nginx
rules:
paths:
pathType: ImplementationSpecific
backend:
service:
name: httpd-service
port:
number: 80
The text was updated successfully, but these errors were encountered: