Applying a taint to the in-scope Nodes (labeled inscope: true) with effect NoSchedule, and configuring a matching toleration on the in-scope Pods, ensures that only Pods carrying that toleration can be scheduled onto those tainted Nodes. This satisfies the requirement that in-scope Nodes contain only in-scope Pods, since any Pod lacking the toleration is blocked from scheduling there. A nodeSelector by itself only directs eligible Pods toward matching Nodes but does not prevent other, non-tolerating Pods from also being scheduled on those same Nodes, so it fails the 'Nodes can only contain in-scope Pods' constraint. Pod Security Policies govern security context settings, not node placement exclusivity, and namespaces do not control which Nodes a Pod is scheduled to.
Community Discussion