Ingress Controller catch-all not working with definied path

Mariusz Ferdyn 5 Reputation points
2025-05-26T14:51:21.6166667+00:00

This one is working fine:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: php-info
  annotations:
    # Enable ModSecurity and OWASP CRS
     nginx.ingress.kubernetes.io/enable-modsecurity: "true"
     nginx.ingress.kubernetes.io/enable-owasp-modsecurity-crs: "true"
    # nginx.ingress.kubernetes.io/modsecurity-snippet: |-
    #  SecRuleEngine On
    #  SecRequestBodyAccess On
    #  SecAuditLog /dev/stdout
    #  SecAuditLogFormat JSON
     nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  #ingressClassName: external-nginx
  rules:
    - http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: php-info
                port:
                  number: 8080

But when I change:

          - path: /

to

          - path: /p

It doesn't work. Even port 80 is not opened. Any idea?

  • host - also resolves the problem, but I would like to use ip address.

I am browsing using IP address in that case and I would like to browse using IP address.

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,447 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mariusz Ferdyn 5 Reputation points
    2025-05-28T10:20:28.35+00:00

    The problem was with healthchecks. So fix needed in:

    service:

        annotations:

          service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path: /

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.