Share via


AffinityV1 Class

Definition

Represents the affinity configuration for a pod, including node affinity, pod affinity, and pod anti-affinity settings. This class defines rules to influence pod scheduling based on various criteria, such as node labels or inter-pod relationships.

[YamlDotNet.Serialization.YamlSerializable]
public sealed class AffinityV1
[<YamlDotNet.Serialization.YamlSerializable>]
type AffinityV1 = class
Public NotInheritable Class AffinityV1
Inheritance
AffinityV1
Attributes
YamlDotNet.Serialization.YamlSerializableAttribute

Constructors

AffinityV1()

Properties

NodeAffinity

Represents the node affinity property that defines node affinity scheduling rules. This property allows specifying preferred or required nodes for scheduling pods.

PodAffinity

Represents inter-pod affinity scheduling rules to influence the placement of pods relative to other pods. This property defines constraints for scheduling pods to be either co-located or not co-located with specified pods, based on labels and topology.

PodAntiAffinity

Represents the pod anti-affinity configuration for scheduling in Kubernetes. Pod anti-affinity allows specifying rules to avoid placing certain pods together on the same node or in a specific topology ___domain. This ensures Pods are scheduled in a manner that prevents tightly coupling their placement.

Applies to