<p>I want to use the same hostname e.g. example.com in two different namespaces with different paths. e.g. in namespace A I want example.com/clientA and in namespace B I want example.com/clientB. Any ideas on how to achieve this?</p>

devcloud
<p><a href="https://github.com/nginxinc" rel="nofollow noreferrer">nginxinc</a> has <a href="https://github.com/nginxinc/kubernetes-ingress/tree/v1.8.1/examples-of-custom-resources/cross-namespace-configuration" rel="nofollow noreferrer">Cross-Namespace Configuration</a> feature that allows you do exactly what you described.
You can also find there prepared examples with deployments, services, etc.</p>
<p>The only thing you most probably wont like..<a href="https://github.com/nginxinc" rel="nofollow noreferrer">nginxinc</a> is not free..</p>
<p>Also look <a href="https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/cross-namespace-configuration/" rel="nofollow noreferrer">here</a></p>
<blockquote>
<p>Cross-namespace Configuration You can spread the Ingress configuration
for a common host across multiple Ingress resources using Mergeable
Ingress resources. Such resources can belong to the same or different
namespaces. This enables easier management when using a large number
of paths. See the Mergeable Ingress Resources example on our GitHub.</p>
<p>As an alternative to Mergeable Ingress resources, you can use
VirtualServer and VirtualServerRoute resources for cross-namespace
configuration. See the Cross-Namespace Configuration example on our
GitHub.</p>
</blockquote>
