All objects that are created within the Kubernetes cluster are grouped by namespace - according to the documentation you can think of a Namespace as a virtual cluster.
One of the aims of a namespace is a logical isolation of objects from each other. A standard Kubernetes cluster is shipped with kube-system (Kubernetes components), kube-public (for public resources), and default for user's workloads.
Referring that knowledge to the Traefik implementation through IngressRoute CRD (Custom Resource Definition) we have to create a middleware in a specific namespace e.g.