Workloads on same node

I have Rancher 2.2.2 in HA and have custom nodes.
I have two workloads that communicate with each other (this works fine).
But, what I want to do now is to make sure these two workloads are always on same node.
I looked thru Node Scheduling. I do not want to tie these workloads to a specific node as nodes may go down for maintenance.
So, what is my best option to make sure the two workloads are always running together on same node?

NodeSelector or Affinity/AntiAffinity + Taints/Tolerances

What you want is pod affinity, which is a beta k8s feature. You can use it, but there’s no controls in the Rancher UI for it.

Indeed, just use the native K8s api, no need to be constrained by Rancher. That’s always the problem with UI’s, or indeed custom API’s, they are nearly always a constraint model. Much as I like Rancher, it’s not the only tool in the box.