Docs for pod affinity namespace selector and pod affinity corss-namespace quota scope.
This commit is contained in:
@@ -271,6 +271,18 @@ If omitted or empty, it defaults to the namespace of the pod where the affinity/
|
||||
All `matchExpressions` associated with `requiredDuringSchedulingIgnoredDuringExecution` affinity and anti-affinity
|
||||
must be satisfied for the pod to be scheduled onto a node.
|
||||
|
||||
#### Namespace selector
|
||||
{{< feature-state for_k8s_version="v1.21" state="alpha" >}}
|
||||
|
||||
Users can also select matching namespaces using `namespaceSelector`, which is a label query over the set of namespaces.
|
||||
The affinity term is applied to the union of the namespaces selected by `namespaceSelector` and the ones listed in the `namespaces` field.
|
||||
Note that an empty `namespaceSelector` ({}) matches all namespaces, while a null or empty `namespaces` list and
|
||||
null `namespaceSelector` means "this pod's namespace".
|
||||
|
||||
This feature is alpha and disabled by default. You can enable it by setting the
|
||||
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
`PodAffinityNamespaceSelector` in both kube-apiserver and kube-scheduler.
|
||||
|
||||
#### More Practical Use-cases
|
||||
|
||||
Interpod Affinity and AntiAffinity can be even more useful when they are used with higher
|
||||
|
||||
Reference in New Issue
Block a user