kubernetes – create ingress success but did not found with kubectl

I am trying to create ingress in kubernetes 1.29.x cluster, this is the yaml configuration:

apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: ai-web-route
  namespace: reddwarf-pro
spec:
  entryPoints:
    - web
  routes:
    - kind: Rule
      match: >-
        Host(`ai.example.top`) && (PathPrefix(`/infra/user/login`) ||
        PathPrefix(`/infra/auth/access-token/refresh`) ||
        PathPrefix(`/infra/user/reg`))
      priority: 8
      services:
        - name: infra-server-service
          port: 8081
    - kind: Rule
      match: Host(`ai.example.top`) && PathPrefix(`/infra`)
      middlewares:
        - name: jwt-token-auth
      priority: 2
      services:
        - name: infra-server-service
          port: 8081
    - kind: Rule
      match: Host(`ai.example.top`) && PathPrefix(`/ai`)
      middlewares:
        - name: jwt-token-auth
      priority: 2
      services:
        - name: chat-hub-service
          port: 8081
    - kind: Rule
      match: Host(`ai.example.top`)
      priority: 1
      services:
        - name: ai-web
          port: 80

then using this command to get the ingress route resource:

[root@iZm5e2jhfbrshckqh6qdbuZ ~]# kubectl get ingressroute --all-namespaces -o wide
NAMESPACE      NAME                      AGE
reddwarf-pro   official-website-route    77m
reddwarf-pro   react-admin-new-route     77m
reddwarf-pro   react-admin-route         77m
reddwarf-pro   snap-web-route            77m
reddwarf-pro   tex-websocket-route       77m
reddwarf-pro   tool-web-route            77m
sre            apollo-dev-config-route   77m
sre            apollo-route              77m

did not found the new create ingress route ai-web-route. Am I missing something? By the way, I am create the ingress in Lens and the lens shows create success.

Read more here: Source link