traefik icon indicating copy to clipboard operation
traefik copied to clipboard

nginx ingress annotation working differently

Open manuelbuil opened this issue 3 weeks ago • 1 comments

Welcome!

  • [x] Yes, I've searched similar issues on GitHub and didn't find any.
  • [x] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?

When using this annotation: "nginx.ingress.kubernetes.io/ssl-redirect: "true", if I curl http://$IP,

  • When $IP is ingress-nginx service IP, I get a "308 Permanent Redirect"
  • When $IP is traefik service IP, I get a "301 Moved Permanently"

Example: https://raw.githubusercontent.com/manuelbuil/PoCs/refs/heads/main/2025/ingress-migration/ssl-redirect-test.yaml

What did you see instead?

I would like to see the same HTTP code

What version of Traefik are you using?

RKE2 v1.34.2+rke2r1 Treafik chart: 37.4.0 Traefik version: v3.6.2

What is your environment & configuration?

# (paste your configuration here)
additionalArguments:
  - "--log.level=DEBUG"
  - "--api.insecure=true"
providers:
  kubernetesIngressNginx:
    enabled: true

Add more configuration information here.

If applicable, please paste the log output in DEBUG level

No response

manuelbuil avatar Dec 03 '25 15:12 manuelbuil

Hey @manuelbuil,

Thank you for raising this issue.

To help us reproduce the bug, could you please provide your NGINX configuration as well? Thanks in advance.

nmengin avatar Dec 03 '25 17:12 nmengin

Closed by #12361

rtribotte avatar Dec 04 '25 16:12 rtribotte