PodAntiAffinityV1 Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the pod anti-affinity rules used in Kubernetes scheduling policies.
[YamlDotNet.Serialization.YamlSerializable]
public sealed class PodAntiAffinityV1
[<YamlDotNet.Serialization.YamlSerializable>]
type PodAntiAffinityV1 = class
Public NotInheritable Class PodAntiAffinityV1
- Inheritance
-
PodAntiAffinityV1
- Attributes
-
YamlDotNet.Serialization.YamlSerializableAttribute
Remarks
PodAntiAffinityV1 defines constraints for scheduling pods on nodes based on anti-affinity rules. Anti-affinity is used to avoid placing certain pods close to each other or restrict them from being scheduled on the same nodes within the cluster. This can enhance fault tolerance, resource allocation, or other layout requirements.
Constructors
PodAntiAffinityV1() |
Properties
PreferredDuringSchedulingIgnoredDuringExecution |
A list of weighted pod affinity terms that are considered during scheduling. This property allows specifying optional pod anti-affinity preferences for scheduling decisions, while permitting the system to schedule pods in scenarios where the preferences cannot be met. Each term is associated with a weight that indicates its relative importance. |
RequiredDuringSchedulingIgnoredDuringExecution |
Represents a list of PodAffinityTermV1 objects used to define required pod anti-affinity constraints that must be met during pod scheduling but are ignored during execution. This property ensures that certain pod placement rules are enforced when scheduling occurs; however, these rules can be relaxed if the constraints are violated at runtime, such as when a node becomes unavailable or pods are rescheduled for fault recovery. |