Please use this template for troubleshooting questions.
My issue: We need help in converting this ingress from k8s INC to F5 NIC with best way possible. Preferably sticking to ingress yaml only for easier migration. Only go to additional CRDs if needed.
**How I encountered the problem: We are getting 404 for the following instead of 200.
The ingress we were using for k8s INC:
**
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapp-ingress
namespace: myapp
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/auth-signin: https://$host/oauth2/start?rd=$request_uri
nginx.ingress.kubernetes.io/auth-url: https://$host/oauth2/auth
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/24, 192.168.1.0/24, 172.16.0.0/16
nginx.ingress.kubernetes.io/x-forwarded-prefix: /myapp/
spec:
rules:
- host: app.example.com
http:
paths:
- backend:
service:
name: myapp-svc
port:
number: 3000
path: /myapp(/|$)(.*)
pathType: ImplementationSpecific
tls:
- hosts:
- app.example.com
secretName: my-tls-certs
**Solutions I’ve tried:
**
— Our attempted F5 NGINX Ingress Controller translation (not working) —
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapp-ingress-f5
namespace: myapp
annotations:
nginx.org/location-snippets: |
auth_request https://$host/oauth2/auth;
auth_request_set $auth_header https://$host/oauth2/start?rd=$request_uri;
auth_request_set $auth_type "";
auth_request_set $auth_secret "";
proxy_set_header X-Forwarded-Prefix /myapp/;
nginx.org/mergeable-ingress-type: minion
nginx.org/rewrite-target: /$2
spec:
ingressClassName: nginx
rules:
- host: app.example.com
http:
paths:
- backend:
service:
name: myapp-svc
port:
number: 3000
path: /myapp(/|$)(.*)
pathType: ImplementationSpecific
Version of NIC and/or NGINX: NIC v5.3.1
**Deployment environment: Self managed kubernetes. Nodeport. AWS Cloud provider.
- Note that whitelistsourcerange, we couldn’t find any alternative. Also, we get this value as a $(list_of_ips_separated_by_commas) from consul db.
- We are unable to add server snippet for any of the above solutions, as ti says only master ingress can have server snippet. WE do have a master ingress and this is a minion ingress.
-what is the auth-url alternative in f5. We have couple of apps using it**