As thought at Name+label+selector scoping for configuration composition · Issue #1698 · kubernetes/kubernetes · GitHub.
My specific scenario is that I have the domain name gateway in namespace=ingress-nginx, and the ip gateway in namespace=app,
- Only one node
- I hope they can each use 80,443
- I plan to use LoadBalancer service to easily switch gateway endpoints by switching selectors.
But I found that so far, selector can still only use the label of the current namespace.
So, we still need to stop the lb service first to free up 80,443. In the same way, this is similar to the hostPort solution
Why don’t we consider adding namespace attributes to the selector to associate cross-namespace applications?
Is there a better solution for my scenario?